aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-03 21:25:58 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-03 23:43:22 +0200
commita9255d37815ba5df553aa6278a9d8bc7603ff458 (patch)
treeeb1c78081ceb26480a12f1d0ce5028666407459f
parent360a3d89918d21f7f0c87a2485a84a988060ec6c (diff)
downloadffmpeg-a9255d37815ba5df553aa6278a9d8bc7603ff458.tar.gz
threads: warn in case of multiple finished setup calls.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/pthread.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index fb5c2f1e1e..08104914ee 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -599,6 +599,10 @@ void ff_thread_finish_setup(AVCodecContext *avctx) {
if (!(avctx->active_thread_type&FF_THREAD_FRAME)) return;
+ if(p->state == STATE_SETUP_FINISHED){
+ av_log(avctx, AV_LOG_WARNING, "Multiple ff_thread_finish_setup() calls\n");
+ }
+
pthread_mutex_lock(&p->progress_mutex);
p->state = STATE_SETUP_FINISHED;
pthread_cond_broadcast(&p->progress_cond);