av_cpu_count: factorize "detected %d logical cores" message
Also print the message just once Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@ -150,7 +150,6 @@ static int thread_init(ThreadContext *c, int nb_threads)
|
||||
|
||||
if (!nb_threads) {
|
||||
int nb_cpus = av_cpu_count();
|
||||
av_log(c->graph, AV_LOG_DEBUG, "Detected %d logical cores.\n", nb_cpus);
|
||||
// use number of cores + 1 as thread count if there is more than one
|
||||
if (nb_cpus > 1)
|
||||
nb_threads = nb_cpus + 1;
|
||||
|
Reference in New Issue
Block a user