[FFmpeg-cvslog] ffmpeg: Fix cleanup with ost = NULL

Michael Niedermayer git at videolan.org
Thu Aug 20 14:53:48 CEST 2015


ffmpeg | branch: release/2.4 | Michael Niedermayer <michael at niedermayer.cc> | Mon Jul 13 23:33:18 2015 +0200| [cf27b297ca0b60c41afa0e43ce046be56a0ed872] | committer: Michael Niedermayer

ffmpeg: Fix cleanup with ost = NULL

Fixes: 09e670595acbdafb226974b08dab66e3_signal_sigabrt_7ffff70eccc9_991_xtrem_e2_m64q15_a32sxx.3gp with memlimit of 1048576

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 503ec7139f887bf8ed8d57da07ce93c4e88447a6)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cf27b297ca0b60c41afa0e43ce046be56a0ed872
---

 ffmpeg.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index a83ed73..d165eee 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -466,7 +466,12 @@ static void ffmpeg_cleanup(int ret)
     }
     for (i = 0; i < nb_output_streams; i++) {
         OutputStream *ost = output_streams[i];
-        AVBitStreamFilterContext *bsfc = ost->bitstream_filters;
+        AVBitStreamFilterContext *bsfc;
+
+        if (!ost)
+            continue;
+
+        bsfc = ost->bitstream_filters;
         while (bsfc) {
             AVBitStreamFilterContext *next = bsfc->next;
             av_bitstream_filter_close(bsfc);



More information about the ffmpeg-cvslog mailing list