summaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-07-14 12:40:04 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-14 12:42:41 +0200
commitbd27dc910248a5da1ac187ac0dd1d1e22bc54a04 (patch)
tree1cd52e9a9e169dac41579c48a404328cc4761852 /ffmpeg.c
parentdfc58584b4e5c35d6aebc5d21223bf714024f0ea (diff)
downloadffmpeg-streaming-bd27dc910248a5da1ac187ac0dd1d1e22bc54a04.zip
ffmpeg-streaming-bd27dc910248a5da1ac187ac0dd1d1e22bc54a04.tar.gz
ffmpeg: Fix deallocating input threads with partly failed file allocation
Fixes: 18615ff56beedc63a884a8db0678b47c_signal_sigsegv_7ffff713351a_991_xtrem_e2_m64q15_a32sxx.3gp with memlimit of 524288 Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index b11afc2..cff9dbc 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3529,7 +3529,7 @@ static void free_input_threads(void)
InputFile *f = input_files[i];
AVPacket pkt;
- if (!f->in_thread_queue)
+ if (!f || !f->in_thread_queue)
continue;
av_thread_message_queue_set_err_send(f->in_thread_queue, AVERROR_EOF);
while (av_thread_message_queue_recv(f->in_thread_queue, &pkt, 0) >= 0)
OpenPOWER on IntegriCloud