From a4ed51ab40878daf8b2128bbcbf7a6d7b4d41649 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 3 Jun 2014 17:09:17 +0200 Subject: [PATCH] avcodec/vp3: free tables before allocating new ones Fixes memleak on seeking Signed-off-by: Michael Niedermayer --- libavcodec/vp3.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index 3c5a4cdaa2..1783041c20 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -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];