You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-11 14:30:22 +02:00
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 503ec7139f
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
7
ffmpeg.c
7
ffmpeg.c
@ -465,7 +465,12 @@ static void ffmpeg_cleanup(int ret)
|
|||||||
}
|
}
|
||||||
for (i = 0; i < nb_output_streams; i++) {
|
for (i = 0; i < nb_output_streams; i++) {
|
||||||
OutputStream *ost = output_streams[i];
|
OutputStream *ost = output_streams[i];
|
||||||
AVBitStreamFilterContext *bsfc = ost->bitstream_filters;
|
AVBitStreamFilterContext *bsfc;
|
||||||
|
|
||||||
|
if (!ost)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
bsfc = ost->bitstream_filters;
|
||||||
while (bsfc) {
|
while (bsfc) {
|
||||||
AVBitStreamFilterContext *next = bsfc->next;
|
AVBitStreamFilterContext *next = bsfc->next;
|
||||||
av_bitstream_filter_close(bsfc);
|
av_bitstream_filter_close(bsfc);
|
||||||
|
Reference in New Issue
Block a user