jpeg2000: Reset s->numX/Ytiles on tile deallocation
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 1 Jul 2013 08:01:36 +0000 (10:01 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Tue, 2 Jul 2013 18:05:48 +0000 (20:05 +0200)
Keep the structure fields more consistent after cleanup.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavcodec/jpeg2000dec.c

index 589cbc1..db7a0c8 100644 (file)
@@ -1233,6 +1233,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)