[FFmpeg-cvslog] mpegvideo: unref cur/next/prev frames when flushing

Hendrik Leppkes git at videolan.org
Wed Apr 24 10:17:20 CEST 2013


ffmpeg | branch: master | Hendrik Leppkes <h.leppkes at gmail.com> | Sat Apr 20 11:33:56 2013 +0200| [feec9349d35b3a46d0c6a05e3b23626050b76a77] | committer: Anton Khirnov

mpegvideo: unref cur/next/prev frames when flushing

Signed-off-by: Anton Khirnov <anton at khirnov.net>

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

 libavcodec/mpegvideo.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 87605fa..f6ec62a 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -2358,6 +2358,10 @@ void ff_mpeg_flush(AVCodecContext *avctx){
         ff_mpeg_unref_picture(s, &s->picture[i]);
     s->current_picture_ptr = s->last_picture_ptr = s->next_picture_ptr = NULL;
 
+    ff_mpeg_unref_picture(s, &s->current_picture);
+    ff_mpeg_unref_picture(s, &s->last_picture);
+    ff_mpeg_unref_picture(s, &s->next_picture);
+
     s->mb_x= s->mb_y= 0;
 
     s->parse_context.state= -1;



More information about the ffmpeg-cvslog mailing list