[FFmpeg-devel] [PATCH 1/2] pthread: Change a signal to a broadcast as multiple threads have been seen waiting and deadlocking on it in bug125.
Michael Niedermayer
michaelni at gmx.at
Sun Jan 22 23:08:54 CET 2012
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
libavcodec/pthread.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index e0921e4..35f8137 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);
--
1.7.5.4
More information about the ffmpeg-devel
mailing list