aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-07-13 23:33:18 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-13 23:34:29 +0200
commit503ec7139f887bf8ed8d57da07ce93c4e88447a6 (patch)
treef38e2b99d73b84716a32f4ea0f516a214fe9d155
parent85b7456efe9c6e6047c849626190f138faa8b42d (diff)
downloadffmpeg-503ec7139f887bf8ed8d57da07ce93c4e88447a6.tar.gz
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>
-rw-r--r--ffmpeg.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 32d0cf7f1b..b11afc285d 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -510,7 +510,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);