fixed a bug in mj2.c that prevented extract_j2k_from_mj2 to build properly. Patch...
authorAntonin Descampe <antonin@gmail.com>
Fri, 8 Oct 2010 10:16:27 +0000 (10:16 +0000)
committerAntonin Descampe <antonin@gmail.com>
Fri, 8 Oct 2010 10:16:27 +0000 (10:16 +0000)
CHANGES
mj2/mj2.c

diff --git a/CHANGES b/CHANGES
index 058da3413d4515478ee8e23d685ebd0bd87ec094..2e8fd599f9773170a5d719440f7aad0c25b56713 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,9 @@ What's New for OpenJPEG
 ! : changed
 + : added
 
+October 08, 2010
+* [antonin] fixed a bug in mj2.c that prevented extract_j2k_from_mj2 to build properly. Patch from winfried.
+
 October 04, 2010
 + [antonin] Added files to let people build openjpeg with 'configure' tools
 + [antonin] Added makefiles to let people manually build openjpeg on *nix platforms
index 3111920a7423c901365ee91fdd8806eb0a3e4ec7..7066ed0829533c5d1c6b141c46a9987bc89495ef 100644 (file)
--- a/mj2/mj2.c
+++ b/mj2/mj2.c
@@ -1101,6 +1101,7 @@ int mj2_read_smj2(opj_image_t * img, mj2_tk_t * tk, opj_cio_t *cio)
   mj2_box_t box;
   mj2_box_t box2;
   int i;
+  struct extension ext;
        
   mj2_read_boxhdr(&box, cio);
        
@@ -1158,8 +1159,9 @@ int mj2_read_smj2(opj_image_t * img, mj2_tk_t * tk, opj_cio_t *cio)
   tk->or_fieldorder = 0;
        
   cio_skip(cio,2);                     /* Pre-defined = -1 */
+  memset(&ext, 0, sizeof(struct extension));
        
-  if (!jp2_read_jp2h(&tk->jp2_struct, cio, NULL)) {
+  if (!jp2_read_jp2h(&tk->jp2_struct, cio, &ext)) {
                opj_event_msg(tk->cinfo, EVT_ERROR, "Error reading JP2H Box\n");
     return 1;
   }