From 9054e725296843c28a85bcd978a0ee7fc93de37f Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 1 Jun 2013 14:33:34 +0200 Subject: [PATCH] jpeg2000: make sure s->numXtiles / s->numYtiles are reset when tile is deallocated This keeps the structure fields more consistent after cleanup Signed-off-by: Michael Niedermayer --- libavcodec/jpeg2000dec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index 9822900b02..aa67ebe719 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -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)