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

Remove FILE* from the openjpeg interface #198

Closed
gcode-importer opened this issue Nov 30, 2012 · 12 comments
Closed

Remove FILE* from the openjpeg interface #198

gcode-importer opened this issue Nov 30, 2012 · 12 comments

Comments

@gcode-importer
Copy link

Originally reported on Google Code with ID 198

I think it is bad idea to transfer FILE* handle from user code to
library in opj_stream_create_default_file_stream and
opj_stream_create_file_stream. It often does not work. See this
article: http://msdn.microsoft.com/en-us/library/ms235460(v=vs.80).aspx

ref:
https://groups.google.com/forum/?fromgroups=#!topic/openjpeg/1ZJgBBsBgGs

Reported by malaterre on 2012-11-30 08:02:57

@gcode-importer
Copy link
Author

related to issue 120

Reported by savmickael on 2012-11-30 10:06:00

@gcode-importer
Copy link
Author

Reported by malaterre on 2014-02-24 09:04:58

@gcode-importer
Copy link
Author

Reported by malaterre on 2014-02-25 15:29:06

  • Labels added: Priority-High, Milestone-Release2.1
  • Labels removed: Priority-Medium

@gcode-importer
Copy link
Author

Reported by malaterre on 2014-02-27 10:18:17

  • Status changed: Started

@gcode-importer
Copy link
Author

Issue 217 has been merged into this issue.

Reported by malaterre on 2014-02-27 17:11:34

@gcode-importer
Copy link
Author

Issue 120 has been merged into this issue.

Reported by malaterre on 2014-02-27 17:11:56

@gcode-importer
Copy link
Author

Does this statement also apply to opj_dump_codec(...FILE* out) ?

Reported by malaterre on 2014-02-28 12:09:59

@gcode-importer
Copy link
Author

I do not see how opj_dump_codec could be affected by this issue (see comment in issue
120). I am therefore only removing two functions:

opj_stream_create_default_file_stream (FILE * p_file, opj_bool p_is_read_stream)
opj_stream_create_file_stream (FILE * p_file, OPJ_UINT32 p_buffer_size, opj_bool p_is_read_stream)

opj_dump_codec will stay until proven wrong.

Reported by malaterre on 2014-03-03 11:16:46

@gcode-importer
Copy link
Author

I don't understand : if opj_dump_codec is in the public API, then it is affected the
same way the others two functions are ?

I have not checked, but I'm pretty sure the following crashes :
- Take a 32 bit linux platform.
- Compile openjpeg -> LFS is activated automatically
- Compile a user project calling opj_dump_codec without activating LFS in this particular
project.
- The FILE* is not compatible between the opj implementation and the user code -> boom



Reported by julienmalik on 2014-03-03 11:31:15

@gcode-importer
Copy link
Author

opj_dump_codec is in the public API, however the FILE* supplied as arguement is only
used to dump output (eg, info about J2K stream). In which case no ftell*/fseek* occur
at all only pure fwrite().

Reported by malaterre on 2014-03-03 11:34:41

@gcode-importer
Copy link
Author

This issue was closed by revision r2547.

Reported by malaterre on 2014-03-03 11:36:37

  • Status changed: Fixed

@gcode-importer
Copy link
Author

OK thanks for the clarification. Agreed.

Reported by julienmalik on 2014-03-03 11:46:25

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

No branches or pull requests

3 participants