aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-01-22 21:13:10 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-01-22 23:07:09 +0100
commit199d4478de102ca7987adb97f2e66a1820a98ebd (patch)
treeca5a91386ea47fc2b0347a6183648e1eb0eae82c
parent2bb7396bfdb29a4187162cb098808c7d08f7f43b (diff)
downloadffmpeg-199d4478de102ca7987adb97f2e66a1820a98ebd.tar.gz
pthread: Change a signal to a broadcast as multiple threads
have been seen waiting and deadlocking on it in bug125. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/pthread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index e0921e4e06..35f8137f03 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -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);