win32: improve threading algorithm warning
authorLuca Barbato <lu_zero@gentoo.org>
Sun, 25 Sep 2011 22:51:14 +0000 (00:51 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Sun, 2 Oct 2011 06:58:08 +0000 (08:58 +0200)
If no threading is requested do not issue warning about unsupported
threading algorithm.

libavcodec/w32thread.c

index 023be0e..ceaafeb 100644 (file)
@@ -130,8 +130,10 @@ int ff_thread_init(AVCodecContext *s){
     ThreadContext *c;
     uint32_t threadid;
 
-    if(!(s->thread_type & FF_THREAD_SLICE)){
-        av_log(s, AV_LOG_WARNING, "The requested thread algorithm is not supported with this thread library.\n");
+    if (s->thread_type && !(s->thread_type & FF_THREAD_SLICE)) {
+        av_log(s, AV_LOG_WARNING,
+            "This thread library only supports FF_THREAD_SLICE"
+            " threading algorithm.\n");
         return 0;
     }