diff --git a/libopenjpeg/j2k.c b/libopenjpeg/j2k.c index eaa75548..aec5d188 100644 --- a/libopenjpeg/j2k.c +++ b/libopenjpeg/j2k.c @@ -6064,15 +6064,7 @@ void opj_j2k_setup_decoder(opj_j2k_v2_t *j2k, opj_dparameters_t *parameters) /* J2K encoder interface */ /* ----------------------------------------------------------------------- */ -opj_j2k_t* j2k_create_compress(opj_common_ptr cinfo) { - opj_j2k_t *j2k = (opj_j2k_t*) opj_calloc(1, sizeof(opj_j2k_t)); - if(j2k) { - j2k->cinfo = cinfo; - } - return j2k; -} - -opj_j2k_v2_t* opj_j2k_create_compress_v2(void) +opj_j2k_v2_t* opj_j2k_create_compress(void) { opj_j2k_v2_t *l_j2k = (opj_j2k_v2_t*) opj_malloc(sizeof(opj_j2k_v2_t)); if (!l_j2k) { diff --git a/libopenjpeg/j2k.h b/libopenjpeg/j2k.h index e8f35fcf..e2fe9355 100644 --- a/libopenjpeg/j2k.h +++ b/libopenjpeg/j2k.h @@ -792,14 +792,7 @@ Creates a J2K compression structure @param cinfo Codec context info @return Returns a handle to a J2K compressor if successful, returns NULL otherwise */ -opj_j2k_t* j2k_create_compress(opj_common_ptr cinfo); - -/** -Creates a J2K compression structure -@param cinfo Codec context info -@return Returns a handle to a J2K compressor if successful, returns NULL otherwise -*/ -opj_j2k_v2_t* opj_j2k_create_compress_v2(void); +opj_j2k_v2_t* opj_j2k_create_compress(void); void opj_j2k_setup_encoder( opj_j2k_v2_t *p_j2k, diff --git a/libopenjpeg/jp2.c b/libopenjpeg/jp2.c index 7e6a373e..22034bc3 100644 --- a/libopenjpeg/jp2.c +++ b/libopenjpeg/jp2.c @@ -2559,7 +2559,7 @@ opj_jp2_v2_t* opj_jp2_create(opj_bool p_is_decoder) /* create the J2K codec */ if (! p_is_decoder) { - jp2->j2k = opj_j2k_create_compress_v2(); + jp2->j2k = opj_j2k_create_compress(); } else { jp2->j2k = opj_j2k_create_decompress(); diff --git a/libopenjpeg/openjpeg.c b/libopenjpeg/openjpeg.c index 93653f49..2c2941fb 100644 --- a/libopenjpeg/openjpeg.c +++ b/libopenjpeg/openjpeg.c @@ -751,7 +751,7 @@ opj_codec_t* OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT p_format) struct opj_image *, struct opj_event_mgr * )) opj_j2k_setup_encoder; - l_codec->m_codec = opj_j2k_create_compress_v2(); + l_codec->m_codec = opj_j2k_create_compress(); if (! l_codec->m_codec) { opj_free(l_codec); return 00;