[FFmpeg-devel] [PATCH] No thread library dependencies when threading support is disabled.

Gregory J. Wolfe gregory.wolfe at kodakalaris.com
Mon Nov 28 21:41:49 EET 2016


When ALL threading support is disabled, the build should not create
a dependency on ANY thread library.

Signed-off-by: Gregory J. Wolfe <gregory.wolfe at kodakalaris.com>
---
 libavutil/cpu.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavutil/cpu.c b/libavutil/cpu.c
index 73317c4..1803f6f 100644
--- a/libavutil/cpu.c
+++ b/libavutil/cpu.c
@@ -260,6 +260,7 @@ int av_cpu_count(void)
     static volatile int printed;
 
     int nb_cpus = 1;
+#if HAVE_THREADS
 #if HAVE_WINRT
     SYSTEM_INFO sysinfo;
 #endif
@@ -288,6 +289,7 @@ int av_cpu_count(void)
     GetNativeSystemInfo(&sysinfo);
     nb_cpus = sysinfo.dwNumberOfProcessors;
 #endif
+#endif
 
     if (!printed) {
         av_log(NULL, AV_LOG_DEBUG, "detected %d logical cores\n", nb_cpus);
-- 
2.5.1.windows.1



More information about the ffmpeg-devel mailing list