Line 944:Memory release of img.comps[i].data when NO_PACKETS_DECODING is not defined
[openjpeg.git] / mj2 / mj2.c
index 074f408ff63def66b6b903e4860efe0e1d01b821..33b970c806762126beaa978ff81819beefc10a96 100644 (file)
--- a/mj2/mj2.c
+++ b/mj2/mj2.c
@@ -155,11 +155,9 @@ int mj2_init_stdmovie(mj2_movie_t * movie)
   time_t ltime;
   movie->brand = MJ2_MJ2;
   movie->minversion = 0;
-  if (!((movie->num_cl<100) && (movie->num_cl>-1))) {
-    movie->num_cl = 2;
-    movie->cl =
-      (unsigned int *) malloc(movie->num_cl * sizeof(unsigned int));
-  }
+  movie->num_cl = 2;
+  movie->cl =
+    (unsigned int *) malloc(movie->num_cl * sizeof(unsigned int));
 
   movie->cl[0] = MJ2_MJ2;
   movie->cl[1] = MJ2_MJ2S;
@@ -2709,7 +2707,7 @@ int mj2_read_struct(FILE *file, mj2_movie_t * movie) {
     case MJ2_SKIP:
       fsresult = fseek(file,foffset+box.length,SEEK_SET);
       if( fsresult ) {
-       fprintf(stderr, "End of file reached while trying to read SKIP bo\nx" );
+       fprintf(stderr, "End of file reached while trying to read SKIP box\n" );
        return 1;
       }
       foffset += box.length;
@@ -2718,7 +2716,7 @@ int mj2_read_struct(FILE *file, mj2_movie_t * movie) {
       fprintf(stderr, "Unknown box in MJ2 stream\n");
       fsresult = fseek(file,foffset+box.length,SEEK_SET);
       if( fsresult ) {
-       fprintf(stderr, "End of file reached while trying to read %s box\n", box.type ); 
+       fprintf(stderr, "End of file reached while trying to read end of unknown box\n"); 
        return 1;
       }      
       foffset += box.length;