diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-14 13:02:19 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-20 04:43:41 +0200 |
commit | 77eddee375357452ec8e0e22b3cd877b38c0a5e9 (patch) | |
tree | 0f1363ef19dfac7078513cfbe594573316a13b0d | |
parent | fca28d35e4936c1914527fefc7dd2d680201aba7 (diff) | |
download | ffmpeg-77eddee375357452ec8e0e22b3cd877b38c0a5e9.tar.gz |
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>
(cherry picked from commit fd4c87fa3becaf8a6c480db915daf51e297b76c5)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | ffmpeg.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1161,7 +1161,7 @@ static void do_video_out(AVFormatContext *s, if (!ost->last_frame) ost->last_frame = av_frame_alloc(); av_frame_unref(ost->last_frame); - if (next_picture) + if (next_picture && ost->last_frame) av_frame_ref(ost->last_frame, next_picture); else av_frame_free(&ost->last_frame); |