jpeg2000: make sure s->numXtiles / s->numYtiles are reset when tile is deallocated
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 1 Jun 2013 12:33:34 +0000 (14:33 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 1 Jun 2013 12:41:46 +0000 (14:41 +0200)
This keeps the structure fields more consistent after cleanup

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/jpeg2000dec.c

index 9822900..aa67ebe 100644 (file)
@@ -1155,6 +1155,7 @@ static void jpeg2000_dec_cleanup(Jpeg2000DecoderContext *s)
         av_freep(&s->tile[tileno].comp);
     }
     av_freep(&s->tile);
+    s->numXtiles = s->numYtiles = 0;
 }
 
 static int jpeg2000_read_main_headers(Jpeg2000DecoderContext *s)