[FFmpeg-devel] [PATCH 08/16] eamad: release the reference frame on video size changes

fenrir at elivagar.org fenrir at elivagar.org
Sat Oct 8 23:40:33 CEST 2011


From: Laurent Aimar <fenrir at videolan.org>

---
 libavcodec/eamad.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c
index dfcdb2e..b0c42f0 100644
--- a/libavcodec/eamad.c
+++ b/libavcodec/eamad.c
@@ -273,6 +273,8 @@ static int decode_frame(AVCodecContext *avctx,
         avcodec_set_dimensions(avctx, s->width, s->height);
         if (t->frame.data[0])
             avctx->release_buffer(avctx, &t->frame);
+        if (t->last_frame.data[0])
+            avctx->release_buffer(avctx, &t->last_frame);
     }
 
     t->frame.reference = 1;
-- 
1.7.2.5



More information about the ffmpeg-devel mailing list