|
|
@ -509,11 +509,11 @@ void ff_thread_finish_setup(AVCodecContext *avctx) { |
|
|
|
|
|
|
|
|
|
|
|
if (!(avctx->active_thread_type&FF_THREAD_FRAME)) return; |
|
|
|
if (!(avctx->active_thread_type&FF_THREAD_FRAME)) return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pthread_mutex_lock(&p->progress_mutex); |
|
|
|
if(p->state == STATE_SETUP_FINISHED){ |
|
|
|
if(p->state == STATE_SETUP_FINISHED){ |
|
|
|
av_log(avctx, AV_LOG_WARNING, "Multiple ff_thread_finish_setup() calls\n"); |
|
|
|
av_log(avctx, AV_LOG_WARNING, "Multiple ff_thread_finish_setup() calls\n"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
pthread_mutex_lock(&p->progress_mutex); |
|
|
|
|
|
|
|
p->state = STATE_SETUP_FINISHED; |
|
|
|
p->state = STATE_SETUP_FINISHED; |
|
|
|
pthread_cond_broadcast(&p->progress_cond); |
|
|
|
pthread_cond_broadcast(&p->progress_cond); |
|
|
|
pthread_mutex_unlock(&p->progress_mutex); |
|
|
|
pthread_mutex_unlock(&p->progress_mutex); |
|
|
|