[FFmpeg-cvslog] avcodec/vp3: free tables before allocating new ones

Michael Niedermayer git at videolan.org
Tue Jun 3 17:29:58 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jun  3 17:09:17 2014 +0200| [a4ed51ab40878daf8b2128bbcbf7a6d7b4d41649] | committer: Michael Niedermayer

avcodec/vp3: free tables before allocating new ones

Fixes memleak on seeking

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a4ed51ab40878daf8b2128bbcbf7a6d7b4d41649
---

 libavcodec/vp3.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 3c5a4cd..1783041 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];
 



More information about the ffmpeg-cvslog mailing list