mirror of https://git.ffmpeg.org/ffmpeg.git
ffmpeg: Free last_frame instead of just unref
Fixes Ticket4611
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d1050d9950
)
Conflicts:
ffmpeg.c
This commit is contained in:
parent
3903a60d4b
commit
568c1b8166
3
ffmpeg.c
3
ffmpeg.c
|
@ -1142,7 +1142,10 @@ static void do_video_out(AVFormatContext *s,
|
||||||
if (!ost->last_frame)
|
if (!ost->last_frame)
|
||||||
ost->last_frame = av_frame_alloc();
|
ost->last_frame = av_frame_alloc();
|
||||||
av_frame_unref(ost->last_frame);
|
av_frame_unref(ost->last_frame);
|
||||||
|
if (next_picture)
|
||||||
av_frame_ref(ost->last_frame, next_picture);
|
av_frame_ref(ost->last_frame, next_picture);
|
||||||
|
else
|
||||||
|
av_frame_free(&ost->last_frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
static double psnr(double d)
|
static double psnr(double d)
|
||||||
|
|
Loading…
Reference in New Issue