Index: core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/cio.c |
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/cio.c b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/cio.c |
index 6cba658a98a09d6cf01aabcd86960c7f6924690e..c455bf7711043ab5c27000cb99d9b3fcd7032272 100644 |
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/cio.c |
+++ b/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/cio.c |
@@ -151,12 +151,11 @@ void opj_read_float_LE(const OPJ_BYTE * p_buffer, OPJ_FLOAT32 * p_value) |
opj_stream_t* OPJ_CALLCONV opj_stream_create(OPJ_SIZE_T p_buffer_size,OPJ_BOOL l_is_input) |
{ |
opj_stream_private_t * l_stream = 00; |
- l_stream = (opj_stream_private_t*) opj_malloc(sizeof(opj_stream_private_t)); |
+ l_stream = (opj_stream_private_t*) opj_calloc(1,sizeof(opj_stream_private_t)); |
if (! l_stream) { |
return 00; |
} |
- memset(l_stream,0,sizeof(opj_stream_private_t)); |
l_stream->m_buffer_size = p_buffer_size; |
l_stream->m_stored_data = (OPJ_BYTE *) opj_malloc(p_buffer_size); |
if (! l_stream->m_stored_data) { |
@@ -204,11 +203,6 @@ void OPJ_CALLCONV opj_stream_destroy(opj_stream_t* p_stream) |
} |
} |
-void OPJ_CALLCONV opj_stream_destroy_v3(opj_stream_t* p_stream) |
-{ |
- opj_stream_destroy(p_stream); |
-} |
- |
void OPJ_CALLCONV opj_stream_set_read_function(opj_stream_t* p_stream, opj_stream_read_fn p_function) |
{ |
opj_stream_private_t* l_stream = (opj_stream_private_t*) p_stream; |
@@ -252,15 +246,7 @@ void OPJ_CALLCONV opj_stream_set_skip_function(opj_stream_t* p_stream, opj_strea |
l_stream->m_skip_fn = p_function; |
} |
-void OPJ_CALLCONV opj_stream_set_user_data(opj_stream_t* p_stream, void * p_data) |
-{ |
- opj_stream_private_t* l_stream = (opj_stream_private_t*) p_stream; |
- if (!l_stream) |
- return; |
- l_stream->m_user_data = p_data; |
-} |
- |
-void OPJ_CALLCONV opj_stream_set_user_data_v3(opj_stream_t* p_stream, void * p_data, opj_stream_free_user_data_fn p_function) |
+void OPJ_CALLCONV opj_stream_set_user_data(opj_stream_t* p_stream, void * p_data, opj_stream_free_user_data_fn p_function) |
{ |
opj_stream_private_t* l_stream = (opj_stream_private_t*) p_stream; |
if (!l_stream) |