Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-21 21:49:12 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-10-21 21:51:21 +0400
commit2444fca523d7a55caa444caad8946b853984b025 (patch)
treee3109de2d4dab4924cc862b7cfdf7d4bac8fa0f3 /libavcodec/pthread.c
parente45460aab0a95e6daf23a1aff3e388cc793abf3a (diff)
parent5152196b2b47d446d9a509b9bfb318daa26a1f2b (diff)
Merge commit '5152196b2b47d446d9a509b9bfb318daa26a1f2b'
* commit '5152196b2b47d446d9a509b9bfb318daa26a1f2b': pthread: Avoid spurious wakeups See: e3329474a366de066b25e86f35f5abf9c5a4b7b2 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/pthread.c')
-rw-r--r--libavcodec/pthread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 8329155d0e..4c6d8784a7 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -63,8 +63,8 @@ typedef struct ThreadContext {
pthread_cond_t last_job_cond;
pthread_cond_t current_job_cond;
pthread_mutex_t current_job_lock;
+ unsigned current_execute;
int current_job;
- unsigned int current_execute;
int done;
} ThreadContext;
@@ -151,8 +151,8 @@ static void* attribute_align_arg worker(void *v)
{
AVCodecContext *avctx = v;
ThreadContext *c = avctx->thread_opaque;
+ unsigned last_execute = 0;
int our_job = c->job_count;
- int last_execute = 0;
int thread_count = avctx->thread_count;
int self_id;