libheif-rs icon indicating copy to clipboard operation
libheif-rs copied to clipboard

fix: Make sure the decoder options isn't freed

Open hfiguiere opened this issue 10 months ago • 0 comments

  • This caused the decoding options to not work as intended
  • valgrind was unhappy

Without the as_ref(), the decoding_options gets dropped, dropping the allocated inner. Then the values inside become garbage, including ignore_transformations.

Note: there is no testing of this in the teste suite. I couldn't figure out how make a proper sample as merely changing the orientation with ExifTool isn't enough. If I figure it out, I can submit a PR testing ignore_transformations.

hfiguiere avatar Apr 13 '24 15:04 hfiguiere