mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
ffmpeg: Free last_frame instead of just unref
Fixes Ticket4611 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit d1050d9950610aa2b27878b67bb2b902dd717e7c) Conflicts: ffmpeg.c
This commit is contained in:
parent
c049e979b6
commit
a5e8ca7e73
5
ffmpeg.c
5
ffmpeg.c
@ -1155,7 +1155,10 @@ static void do_video_out(AVFormatContext *s,
|
||||
if (!ost->last_frame)
|
||||
ost->last_frame = av_frame_alloc();
|
||||
av_frame_unref(ost->last_frame);
|
||||
av_frame_ref(ost->last_frame, next_picture);
|
||||
if (next_picture)
|
||||
av_frame_ref(ost->last_frame, next_picture);
|
||||
else
|
||||
av_frame_free(&ost->last_frame);
|
||||
}
|
||||
|
||||
static double psnr(double d)
|
||||
|
Loading…
x
Reference in New Issue
Block a user