Commit bd27dc91 authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent dfc58584
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment