pthreads: reset active_thread_type when slice thread_init returrns early
authorJanne Grunau <janne-libav@jannau.net>
Wed, 21 Dec 2011 12:07:54 +0000 (13:07 +0100)
committerJanne Grunau <janne-libav@jannau.net>
Thu, 22 Dec 2011 20:50:07 +0000 (21:50 +0100)
libavcodec/pthread.c

index 7e03c64..ac15fef 100644 (file)
@@ -237,8 +237,10 @@ static int thread_init(AVCodecContext *avctx)
     ThreadContext *c;
     int thread_count = avctx->thread_count;
 
-    if (thread_count <= 1)
+    if (thread_count <= 1) {
+        avctx->active_thread_type = 0;
         return 0;
+    }
 
     c = av_mallocz(sizeof(ThreadContext));
     if (!c)