opj_thread_pool: fix potential deadlock at thread pool destruction

This commit is contained in:
Even Rouault 2016-09-08 09:43:36 +02:00
parent 4f9abb9a45
commit ab22c5bad5
1 changed files with 2 additions and 0 deletions

View File

@ -930,7 +930,9 @@ void opj_thread_pool_destroy(opj_thread_pool_t* tp)
int i;
opj_thread_pool_wait_completion(tp, 0);
opj_mutex_lock(tp->mutex);
tp->state = OPJWTS_STOP;
opj_mutex_unlock(tp->mutex);
for(i=0;i<tp->worker_threads_count;i++)
{