diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-14 00:33:18 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-20 05:43:41 +0300 |
commit | fca28d35e4936c1914527fefc7dd2d680201aba7 (patch) | |
tree | 977db7688983f875b4a8d1c0f9ca598570d0bbde | |
parent | 9d0f7a8d78d67d71be190714838d2b2537e84513 (diff) |
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@niedermayer.cc>
(cherry picked from commit 503ec7139f887bf8ed8d57da07ce93c4e88447a6)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | ffmpeg.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -465,7 +465,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); |