]> git.sesse.net Git - ffmpeg/commitdiff
eamad: release the reference frame on video size changes
authorLaurent Aimar <fenrir@videolan.org>
Sat, 8 Oct 2011 21:40:33 +0000 (23:40 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 9 Oct 2011 01:08:03 +0000 (03:08 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/eamad.c

index dfcdb2eaa14dcb416be8c91b8077bc086f36a349..b0c42f0222a425c13c367324e683f3278b7d6461 100644 (file)
@@ -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;