]> granicus.if.org Git - libx264/commitdiff
threads=auto on multicore now implies thread input, just like explicit thread numbers...
authorLoren Merritt <pengvado@akuvian.org>
Thu, 10 Apr 2008 09:17:53 +0000 (03:17 -0600)
committerLoren Merritt <pengvado@akuvian.org>
Thu, 10 Apr 2008 09:20:27 +0000 (03:20 -0600)
x264.c

diff --git a/x264.c b/x264.c
index efdc5c3a1800556e6127e89ff6751c2276be7d57..51bd0cd97500d7232589bdadbbcbc944cdc1103d 100644 (file)
--- a/x264.c
+++ b/x264.c
@@ -29,6 +29,7 @@
 #include <getopt.h>
 
 #include "common/common.h"
+#include "common/cpu.h"
 #include "x264.h"
 #include "muxers.h"
 
@@ -664,7 +665,8 @@ static int  Parse( int argc, char **argv,
     }
 
 #ifdef HAVE_PTHREAD
-    if( b_thread_input || param->i_threads > 1 )
+    if( b_thread_input || param->i_threads > 1
+        || (param->i_threads == 0 && x264_cpu_num_processors() > 1) )
     {
         if( open_file_thread( NULL, &opt->hin, param ) )
         {