Commit 199d4478 authored by Michael Niedermayer's avatar Michael Niedermayer

pthread: Change a signal to a broadcast as multiple threads

have been seen waiting and deadlocking on it in bug125.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 2bb7396b
......@@ -960,7 +960,7 @@ int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f)
p->requested_frame = f;
p->state = STATE_GET_BUFFER;
pthread_mutex_lock(&p->progress_mutex);
pthread_cond_signal(&p->progress_cond);
pthread_cond_broadcast(&p->progress_cond);
while (p->state != STATE_SETTING_UP)
pthread_cond_wait(&p->progress_cond, &p->progress_mutex);
......
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