diff options
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/cpu.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavutil/cpu.c b/libavutil/cpu.c index 73d58565f3..10e15ba668 100644 --- a/libavutil/cpu.c +++ b/libavutil/cpu.c @@ -198,6 +198,8 @@ int av_parse_cpu_caps(unsigned *flags, const char *s) int av_cpu_count(void) { + static volatile int printed; + int ret, nb_cpus = 1; #if HAVE_SCHED_GETAFFINITY && defined(CPU_COUNT) cpu_set_t cpuset; @@ -226,6 +228,11 @@ int av_cpu_count(void) nb_cpus = sysconf(_SC_NPROCESSORS_ONLN); #endif + if (!printed) { + av_log(NULL, AV_LOG_DEBUG, "detected %d logical cores\n", nb_cpus); + printed = 1; + } + return nb_cpus; } |