Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialise J2KDecoder member variables #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lpartington
Copy link

The decoder member variables are not initialised, so the getXXX methods return essentially random values if decoding fails (the values are not entirely random in the WASM build - it appears that a J2KDecoder instance will sometimes be placed in the same location as a previous instance and will get whatever values that previous instance had, which can be very confusing).
Unfortunately the c++ test had to be modified as 'designated initializers' syntax is incompatible with a default constructor for FrameInfo. An alternative would be to initialize each member of FrameInfo in the J2KDecoder ctor but this seems a bit uglier to me.

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