summaryrefslogtreecommitdiff
authorMichael Niedermayer <michaelni@gmx.at>2013-10-13 22:04:52 (GMT)
committer Michael Niedermayer <michaelni@gmx.at>2013-10-13 22:04:52 (GMT)
commit005200887b2c9df2e489bd6419697a6841dba396 (patch)
tree6beb6b36ee4273f29771cd99ea8cf3443dc7f687
parent5340c3dd8d2ae14dc1f1df880f3c0857f2ec8c00 (diff)
parenteb90a2091ffb94d8c29aaa5ff50f4192520254fc (diff)
downloadffmpeg-005200887b2c9df2e489bd6419697a6841dba396.zip
ffmpeg-005200887b2c9df2e489bd6419697a6841dba396.tar.gz
ffmpeg-005200887b2c9df2e489bd6419697a6841dba396.tar.bz2
Merge commit 'eb90a2091ffb94d8c29aaa5ff50f4192520254fc'
* commit 'eb90a2091ffb94d8c29aaa5ff50f4192520254fc': pthread: Fix deadlock during thread initialization Conflicts: libavcodec/pthread.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat
-rw-r--r--libavfilter/pthread.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/pthread.c b/libavfilter/pthread.c
index 0371d8a..8ae2c3f 100644
--- a/libavfilter/pthread.c
+++ b/libavfilter/pthread.c
@@ -75,7 +75,8 @@ static void* attribute_align_arg worker(void *v)
if (c->current_job == nb_threads + c->nb_jobs)
pthread_cond_signal(&c->last_job_cond);
- pthread_cond_wait(&c->current_job_cond, &c->current_job_lock);
+ if (!c->done)
+ pthread_cond_wait(&c->current_job_cond, &c->current_job_lock);
our_job = self_id;
if (c->done) {