ffmpeg: Free last_frame instead of just unref
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 18 Jun 2015 03:27:08 +0000 (05:27 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 18 Jun 2015 03:27:08 +0000 (05:27 +0200)
Fixes Ticket4611

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

index 40d929d..f502998 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1178,6 +1178,8 @@ static void do_video_out(AVFormatContext *s,
     av_frame_unref(ost->last_frame);
     if (next_picture)
         av_frame_ref(ost->last_frame, next_picture);
+    else
+        av_frame_free(&ost->last_frame);
 }
 
 static double psnr(double d)