Commit 2ee01fbd authored by Ronald S. Bultje's avatar Ronald S. Bultje Committed by Anton Khirnov

pthread: free progress if buffer allocation failed.

Else we run out of progress variables after a few failed buffer
allocations.
Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent bc1ef855
......@@ -951,6 +951,10 @@ int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f)
ff_thread_finish_setup(avctx);
}
if (err) {
free_progress(f);
f->thread_opaque = NULL;
}
pthread_mutex_unlock(&p->parent->buffer_mutex);
return err;
......
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