aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-03 17:09:17 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-03 17:09:17 +0200
commita4ed51ab40878daf8b2128bbcbf7a6d7b4d41649 (patch)
tree3831d5dbbd6ab4d0e05765a39510794b6767467c
parent90b26d63ba0e657ecb04d50a4117d941027432db (diff)
downloadffmpeg-a4ed51ab40878daf8b2128bbcbf7a6d7b4d41649.tar.gz
avcodec/vp3: free tables before allocating new ones
Fixes memleak on seeking Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/vp3.c2
1 files changed, 2 insertions, 0 deletions
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];