[FFmpeg-cvslog] ffmpeg: Fix crash with ost->last_frame allocation failure
Michael Niedermayer
git at videolan.org
Sat Jul 18 20:46:09 CEST 2015
ffmpeg | branch: release/2.7 | Michael Niedermayer <michael at niedermayer.cc> | Tue Jul 14 13:02:19 2015 +0200| [a18e8d82de87f6cd88a68ede8f5526a102d47869] | committer: Michael Niedermayer
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 at niedermayer.cc>
(cherry picked from commit fd4c87fa3becaf8a6c480db915daf51e297b76c5)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a18e8d82de87f6cd88a68ede8f5526a102d47869
---
ffmpeg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index d23e713..52aa967 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1182,7 +1182,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);
More information about the ffmpeg-cvslog
mailing list