X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=ffmpeg.c;h=f5029987ade2e025d472ceb614990b4d2927744e;hb=4299f085f45cdd8fcb3ecf681d9fef0c4b3fe207;hp=40d929dac2316e19ac6329de501b18734baf1144;hpb=da05c624996f46d1b3547ac8fa62c7e7db09e345;p=ffmpeg diff --git a/ffmpeg.c b/ffmpeg.c index 40d929dac23..f5029987ade 100644 --- 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)