You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
ffmpeg: Fix crash with ost->last_frame allocation failure
Fixes: 1013dbde2c360d939cc2dfc33e4f275c_signal_sigsegv_a0500f_45_320vp3.nsv with memlimit of 536870912 Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
2
ffmpeg.c
2
ffmpeg.c
@@ -1227,7 +1227,7 @@ 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)
|
if (next_picture && ost->last_frame)
|
||||||
av_frame_ref(ost->last_frame, next_picture);
|
av_frame_ref(ost->last_frame, next_picture);
|
||||||
else
|
else
|
||||||
av_frame_free(&ost->last_frame);
|
av_frame_free(&ost->last_frame);
|
||||||
|
Reference in New Issue
Block a user