]> granicus.if.org Git - openjpeg/commitdiff
Fixed wrong destructors called in openjpeg.c
authorFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>
Tue, 28 Aug 2007 10:13:58 +0000 (10:13 +0000)
committerFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>
Tue, 28 Aug 2007 10:13:58 +0000 (10:13 +0000)
Fixed bug in j2k_decode_jpt_stream

ChangeLog
libopenjpeg/j2k.c
libopenjpeg/openjpeg.c

index 0fc696a07b8773d0ae6b0fe7297df082e1c16c29..5a5ca196b234d2688033e1754a92c34deb9133e3 100644 (file)
--- 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.
 
index c380782fc062ba5b8ffe64af8060f57943e7160b..cbf6a1fad50a49c7175b1b67776c19c8c471ca19 100644 (file)
@@ -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;
        
index f7363b9b8f5175546baa389f70d0826a50598d1d..ba3ac6d88c8314d51b0b8e693a9345064a4b0e5f 100644 (file)
@@ -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: