From 72b6fdb04b93354229cc1e6118d55b884e0a59e3 Mon Sep 17 00:00:00 2001 From: Antonin Descampe Date: Fri, 8 Oct 2010 10:16:27 +0000 Subject: [PATCH] fixed a bug in mj2.c that prevented extract_j2k_from_mj2 to build properly. Patch from winfried --- CHANGES | 3 +++ mj2/mj2.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 058da341..2e8fd599 100644 --- 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 diff --git a/mj2/mj2.c b/mj2/mj2.c index 3111920a..7066ed08 100644 --- 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; }