mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-30 12:44:07 +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)
|
//Find a task (should be fast enough)
|
||||||
job = NULL;
|
job = NULL;
|
||||||
if (next_job) {
|
if (next_job) {
|
||||||
PTHREAD_LOCK(&next_job->lock);
|
|
||||||
assert(next_job->ndepends == 0);
|
assert(next_job->ndepends == 0);
|
||||||
job = next_job;
|
job = next_job;
|
||||||
} else {
|
} else {
|
||||||
|
@ -146,8 +145,6 @@ static void* threadqueue_worker(void* threadqueue_worker_spec_opaque) {
|
||||||
++threadqueue->queue_running;
|
++threadqueue->queue_running;
|
||||||
}
|
}
|
||||||
|
|
||||||
//We can unlock the job here, since fptr and arg are constant
|
|
||||||
PTHREAD_UNLOCK(&job->lock);
|
|
||||||
//Unlock the queue
|
//Unlock the queue
|
||||||
PTHREAD_UNLOCK(&threadqueue->lock);
|
PTHREAD_UNLOCK(&threadqueue->lock);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue