diff --git a/applications/mj2/extract_j2k_from_mj2.c b/applications/mj2/extract_j2k_from_mj2.c index 2d4cedbc..9242c4e7 100644 --- a/applications/mj2/extract_j2k_from_mj2.c +++ b/applications/mj2/extract_j2k_from_mj2.c @@ -31,6 +31,7 @@ #include #include "openjpeg.h" +#include "cio.h" #include "j2k.h" #include "jp2.h" #include "mj2.h" diff --git a/applications/mj2/frames_to_mj2.c b/applications/mj2/frames_to_mj2.c index 799d42ab..10cea009 100644 --- a/applications/mj2/frames_to_mj2.c +++ b/applications/mj2/frames_to_mj2.c @@ -31,9 +31,9 @@ #include "openjpeg.h" #include "j2k_lib.h" +#include "cio.h" #include "j2k.h" #include "jp2.h" -#include "cio.h" #include "mj2.h" #include "mj2_convert.h" #include "opj_getopt.h" diff --git a/applications/mj2/mj2.c b/applications/mj2/mj2.c index b2b2c377..a8b3e37f 100644 --- a/applications/mj2/mj2.c +++ b/applications/mj2/mj2.c @@ -1096,8 +1096,8 @@ 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; opj_jp2_color_t color; + int i; opj_bool ok; mj2_read_boxhdr(&box, cio); @@ -2766,9 +2766,9 @@ void mj2_destroy_decompress(opj_mj2_t *movie) { if (tk->name_size != 0) opj_free(tk->name); if (tk->track_type == 0) {// Video track - if (tk->jp2_struct.comps != 0) + if (tk->jp2_struct.comps != NULL) opj_free(tk->jp2_struct.comps); - if (tk->jp2_struct.cl != 0) + if (tk->jp2_struct.cl != NULL) opj_free(tk->jp2_struct.cl); if (tk->num_jp2x != 0) opj_free(tk->jp2xdata); @@ -2885,9 +2885,9 @@ void mj2_destroy_compress(opj_mj2_t *movie) { if (tk->name_size != 0) opj_free(tk->name); if (tk->track_type == 0) {// Video track - if (tk->jp2_struct.comps != 0) + if (tk->jp2_struct.comps != NULL) opj_free(tk->jp2_struct.comps); - if (tk->jp2_struct.cl != 0) + if (tk->jp2_struct.cl != NULL) opj_free(tk->jp2_struct.cl); if (tk->num_jp2x != 0) opj_free(tk->jp2xdata);