Fixed wrong destructors called in openjpeg.c

Fixed bug in j2k_decode_jpt_stream
This commit is contained in:
Francois-Olivier Devaux 2007-08-28 10:13:58 +00:00
parent c101f8049c
commit d07fa5d9d0
3 changed files with 7 additions and 2 deletions

View File

@ -5,6 +5,10 @@ What's New for OpenJPEG
! : changed ! : changed
+ : added + : added
August 28, 2007
* [FOD] Fixed wrong destructors called in openjpeg.c
* [FOD] Fixed bug in j2k_decode_jpt_stream
August 24, 2007 August 24, 2007
* [Parvatha] The end of main header is calculated after TLM and POC marker for Dcinema. * [Parvatha] The end of main header is calculated after TLM and POC marker for Dcinema.

View File

@ -1816,6 +1816,7 @@ opj_image_t* j2k_decode_jpt_stream(opj_j2k_t *j2k, opj_cio_t *cio) {
/* create an empty image */ /* create an empty image */
image = opj_image_create0(); image = opj_image_create0();
j2k->image = image;
j2k->state = J2K_STATE_MHSOC; j2k->state = J2K_STATE_MHSOC;

View File

@ -203,10 +203,10 @@ void OPJ_CALLCONV opj_destroy_compress(opj_cinfo_t *cinfo) {
/* destroy the codec */ /* destroy the codec */
switch(cinfo->codec_format) { switch(cinfo->codec_format) {
case CODEC_J2K: case CODEC_J2K:
j2k_destroy_decompress((opj_j2k_t*)cinfo->j2k_handle); j2k_destroy_compress((opj_j2k_t*)cinfo->j2k_handle);
break; break;
case CODEC_JP2: case CODEC_JP2:
jp2_destroy_decompress((opj_jp2_t*)cinfo->jp2_handle); jp2_destroy_compress((opj_jp2_t*)cinfo->jp2_handle);
break; break;
case CODEC_JPT: case CODEC_JPT:
case CODEC_UNKNOWN: case CODEC_UNKNOWN: