Skip to content

Fix codestream_info memory leak#7

Open
lpartington wants to merge 4 commits intochafey:masterfrom
lpartington:lpp_memleak
Open

Fix codestream_info memory leak#7
lpartington wants to merge 4 commits intochafey:masterfrom
lpartington:lpp_memleak

Conversation

@lpartington
Copy link

@lpartington lpartington commented Mar 15, 2023

  1. The return value from opj_get_cstr_info has to be freed by calling opj_destroy_cstr_info.
  2. It is convenient to allocate the output image buffer (decoded_) before calling opj_decode; this was observed to allow failure sooner if there wasn't enough memory to decode AND return the image.
  3. Minor correction to readme - it appears that openjpeg master branch is used now
  4. decoded_ buffer is cleared at start of decode_i() to reduce memory footprint (i.e. before openjpeg objects are allocated)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant