diff options
| author | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2014-03-03 11:36:31 +0000 |
|---|---|---|
| committer | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2014-03-03 11:36:31 +0000 |
| commit | 25255c4ed1cb1974857189a2a5c67f878c923cc3 (patch) | |
| tree | c174ee9190f9a9885ecf917c5c86639871d9c902 /src/lib/openjp2/openjpeg.c | |
| parent | 16febebd28aafe8a47472d669b399dded8f84c5e (diff) | |
[trunk] remove all api with invalid FILE* parameters which could leads to issues when applications are compiled with different flags from openjpeg.
Fixes issue 198
Diffstat (limited to 'src/lib/openjp2/openjpeg.c')
| -rw-r--r-- | src/lib/openjp2/openjpeg.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/lib/openjp2/openjpeg.c b/src/lib/openjp2/openjpeg.c index 31199b24..957143f3 100644 --- a/src/lib/openjp2/openjpeg.c +++ b/src/lib/openjp2/openjpeg.c @@ -1029,49 +1029,11 @@ void OPJ_CALLCONV opj_destroy_cstr_index(opj_codestream_index_t **p_cstr_index) } } -/* ---------------------------------------------------------------------- */ -static opj_stream_t* opj_stream_create_file_stream_impl ( FILE * p_file, - OPJ_SIZE_T p_size, - OPJ_BOOL p_is_read_stream) -{ - opj_stream_t* l_stream = 00; - - if (! p_file) { - return NULL; - } - - l_stream = opj_stream_create(p_size,p_is_read_stream); - if (! l_stream) { - return NULL; - } - - opj_stream_set_user_data(l_stream, p_file); - opj_stream_set_user_data_length(l_stream, opj_get_data_length_from_file(p_file)); - opj_stream_set_read_function(l_stream, (opj_stream_read_fn) opj_read_from_file); - opj_stream_set_write_function(l_stream, (opj_stream_write_fn) opj_write_from_file); - opj_stream_set_skip_function(l_stream, (opj_stream_skip_fn) opj_skip_from_file); - opj_stream_set_seek_function(l_stream, (opj_stream_seek_fn) opj_seek_from_file); - - return l_stream; -} - -opj_stream_t* OPJ_CALLCONV opj_stream_create_default_file_stream (FILE * p_file, OPJ_BOOL p_is_read_stream) -{ - return opj_stream_create_file_stream_impl(p_file,OPJ_J2K_STREAM_CHUNK_SIZE,p_is_read_stream); -} - opj_stream_t* OPJ_CALLCONV opj_stream_create_default_file_stream_v3 (const char *fname, OPJ_BOOL p_is_read_stream) { return opj_stream_create_file_stream_v3(fname, OPJ_J2K_STREAM_CHUNK_SIZE, p_is_read_stream); } -opj_stream_t* OPJ_CALLCONV opj_stream_create_file_stream ( FILE * p_file, - OPJ_SIZE_T p_size, - OPJ_BOOL p_is_read_stream) -{ - return opj_stream_create_file_stream_impl(p_file,p_size,p_is_read_stream); -} - opj_stream_t* OPJ_CALLCONV opj_stream_create_file_stream_v3 ( const char *fname, OPJ_SIZE_T p_size, |
