Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-07-14 00:33:18 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-20 05:43:41 +0300
commitfca28d35e4936c1914527fefc7dd2d680201aba7 (patch)
tree977db7688983f875b4a8d1c0f9ca598570d0bbde
parent9d0f7a8d78d67d71be190714838d2b2537e84513 (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.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 9f3e6068f4..287b1c18e3 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -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);