mirror of
https://github.com/webmproject/libwebp.git
synced 2025-02-13 15:32:53 +01:00
Merge "thread_utils: fix potentially bad call to Execute"
This commit is contained in:
commit
3c49fc47e7
@ -201,8 +201,6 @@ static int pthread_cond_wait(pthread_cond_t* const condition,
|
|||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
static void Execute(WebPWorker* const worker); // Forward declaration.
|
|
||||||
|
|
||||||
static THREADFN ThreadLoop(void* ptr) {
|
static THREADFN ThreadLoop(void* ptr) {
|
||||||
WebPWorker* const worker = (WebPWorker*)ptr;
|
WebPWorker* const worker = (WebPWorker*)ptr;
|
||||||
int done = 0;
|
int done = 0;
|
||||||
@ -212,7 +210,7 @@ static THREADFN ThreadLoop(void* ptr) {
|
|||||||
pthread_cond_wait(&worker->impl_->condition_, &worker->impl_->mutex_);
|
pthread_cond_wait(&worker->impl_->condition_, &worker->impl_->mutex_);
|
||||||
}
|
}
|
||||||
if (worker->status_ == WORK) {
|
if (worker->status_ == WORK) {
|
||||||
Execute(worker);
|
WebPGetWorkerInterface()->Execute(worker);
|
||||||
worker->status_ = OK;
|
worker->status_ = OK;
|
||||||
} else if (worker->status_ == NOT_OK) { // finish the worker
|
} else if (worker->status_ == NOT_OK) { // finish the worker
|
||||||
done = 1;
|
done = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user