1
0
mirror of https://git.ffmpeg.org/ffmpeg.git synced 2024-12-31 20:02:07 +00:00

pthread: free progress if buffer allocation failed.

Else we run out of progress variables after a few failed buffer
allocations.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
Ronald S. Bultje 2012-03-24 20:19:19 +01:00 committed by Anton Khirnov
parent bc1ef85520
commit 2ee01fbded

View File

@ -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;