Browse code

pthreads: reset active_thread_type when slice thread_init returrns early

Janne Grunau authored on 2011/12/21 21:07:54
Showing 1 changed files
... ...
@@ -237,8 +237,10 @@ static int thread_init(AVCodecContext *avctx)
237 237
     ThreadContext *c;
238 238
     int thread_count = avctx->thread_count;
239 239
 
240
-    if (thread_count <= 1)
240
+    if (thread_count <= 1) {
241
+        avctx->active_thread_type = 0;
241 242
         return 0;
243
+    }
242 244
 
243 245
     c = av_mallocz(sizeof(ThreadContext));
244 246
     if (!c)