avcodec/vp3: free tables before allocating new ones
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 3 Jun 2014 15:09:17 +0000 (17:09 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 3 Jun 2014 15:09:17 +0000 (17:09 +0200)
Fixes memleak on seeking

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

index 3c5a4cd..1783041 100644 (file)
@@ -1662,6 +1662,8 @@ static av_cold int allocate_tables(AVCodecContext *avctx)
     Vp3DecodeContext *s = avctx->priv_data;
     int y_fragment_count, c_fragment_count;
 
+    free_tables(avctx);
+
     y_fragment_count = s->fragment_width[0] * s->fragment_height[0];
     c_fragment_count = s->fragment_width[1] * s->fragment_height[1];