mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
Fix mutex being unlocked twice.
This commit is contained in:
parent
80ec1fda3a
commit
cdb66baf16
|
@ -107,7 +107,6 @@ static void* threadqueue_worker(void* threadqueue_worker_spec_opaque) {
|
|||
//Find a task (should be fast enough)
|
||||
job = NULL;
|
||||
if (next_job) {
|
||||
PTHREAD_LOCK(&next_job->lock);
|
||||
assert(next_job->ndepends == 0);
|
||||
job = next_job;
|
||||
} else {
|
||||
|
@ -146,8 +145,6 @@ static void* threadqueue_worker(void* threadqueue_worker_spec_opaque) {
|
|||
++threadqueue->queue_running;
|
||||
}
|
||||
|
||||
//We can unlock the job here, since fptr and arg are constant
|
||||
PTHREAD_UNLOCK(&job->lock);
|
||||
//Unlock the queue
|
||||
PTHREAD_UNLOCK(&threadqueue->lock);
|
||||
|
||||
|
|
Loading…
Reference in a new issue