OSDN Git Service

w32threads: with only 1 thread there cant be a active threading mode.
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 18 Jun 2011 19:59:11 +0000 (21:59 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 19 Jun 2011 01:54:15 +0000 (03:54 +0200)
Fixes ticket284

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/w32thread.c

index 7c4c760..501f0ce 100644 (file)
@@ -135,11 +135,11 @@ int ff_thread_init(AVCodecContext *s){
         return 0;
     }
 
-    s->active_thread_type= FF_THREAD_SLICE;
-
     if (s->thread_count <= 1)
         return 0;
 
+    s->active_thread_type= FF_THREAD_SLICE;
+
     assert(!s->thread_opaque);
     c= av_mallocz(sizeof(ThreadContext)*s->thread_count);
     s->thread_opaque= c;