strukturag / libheif

libheif is an HEIF and AVIF file format decoder and encoder.
Other
1.6k stars 292 forks source link

Should the destructor of decoder_context include more cleanups? #1166

Closed dlemstra closed 2 weeks ago

dlemstra commented 1 month ago

Inside the reset method of the decoder_context the following is done:

  dpb.clear();

  nal_parser.remove_pending_input_data();

Should this not also be done inside the destructor of decoder_context? We are getting an oss-fuzz error report about memory leaks of NAL_unit in the oss-fuzz tooling of @ImageMagick and it looks like it is happening because of this?

farindk commented 2 weeks ago

Belongs to libde265, not libheif. I've copied it over to there.