From d07fa5d9d0b5f3452831e4c0c9da1f03d30a1299 Mon Sep 17 00:00:00 2001 From: Francois-Olivier Devaux Date: Tue, 28 Aug 2007 10:13:58 +0000 Subject: [PATCH] Fixed wrong destructors called in openjpeg.c Fixed bug in j2k_decode_jpt_stream --- ChangeLog | 4 ++++ libopenjpeg/j2k.c | 1 + libopenjpeg/openjpeg.c | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0fc696a0..5a5ca196 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ What's New for OpenJPEG ! : changed + : added +August 28, 2007 +* [FOD] Fixed wrong destructors called in openjpeg.c +* [FOD] Fixed bug in j2k_decode_jpt_stream + August 24, 2007 * [Parvatha] The end of main header is calculated after TLM and POC marker for Dcinema. diff --git a/libopenjpeg/j2k.c b/libopenjpeg/j2k.c index c380782f..cbf6a1fa 100644 --- a/libopenjpeg/j2k.c +++ b/libopenjpeg/j2k.c @@ -1816,6 +1816,7 @@ opj_image_t* j2k_decode_jpt_stream(opj_j2k_t *j2k, opj_cio_t *cio) { /* create an empty image */ image = opj_image_create0(); + j2k->image = image; j2k->state = J2K_STATE_MHSOC; diff --git a/libopenjpeg/openjpeg.c b/libopenjpeg/openjpeg.c index f7363b9b..ba3ac6d8 100644 --- a/libopenjpeg/openjpeg.c +++ b/libopenjpeg/openjpeg.c @@ -203,10 +203,10 @@ void OPJ_CALLCONV opj_destroy_compress(opj_cinfo_t *cinfo) { /* destroy the codec */ switch(cinfo->codec_format) { case CODEC_J2K: - j2k_destroy_decompress((opj_j2k_t*)cinfo->j2k_handle); + j2k_destroy_compress((opj_j2k_t*)cinfo->j2k_handle); break; case CODEC_JP2: - jp2_destroy_decompress((opj_jp2_t*)cinfo->jp2_handle); + jp2_destroy_compress((opj_jp2_t*)cinfo->jp2_handle); break; case CODEC_JPT: case CODEC_UNKNOWN: