diff options
author | Janne Grunau <janne-libav@jannau.net> | 2011-12-23 11:10:37 +0100 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2011-12-23 14:41:03 +0100 |
commit | 7052618c7ed6e907434b2b6ef18e77b9d2644676 (patch) | |
tree | 9cb3cf7f5a7f1233e5e8138872e765125ba23296 /libavcodec | |
parent | 846dca1aa315ebb65845a8e4774a31e368cc463d (diff) | |
download | ffmpeg-streaming-7052618c7ed6e907434b2b6ef18e77b9d2644676.zip ffmpeg-streaming-7052618c7ed6e907434b2b6ef18e77b9d2644676.tar.gz |
threads: check defines before using them in automatic thread detection
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/pthread.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c index 8914150..f842edf 100644 --- a/libavcodec/pthread.c +++ b/libavcodec/pthread.c @@ -152,7 +152,7 @@ typedef struct FrameThreadContext { static int get_logical_cpus(AVCodecContext *avctx) { int ret, nb_cpus = 1; -#if HAVE_SCHED_GETAFFINITY +#if HAVE_SCHED_GETAFFINITY && defined(CPU_COUNT) cpu_set_t cpuset; CPU_ZERO(&cpuset); @@ -165,7 +165,7 @@ static int get_logical_cpus(AVCodecContext *avctx) SYSTEM_INFO sysinfo; GetSystemInfo(&sysinfo); nb_cpus = sysinfo.dwNumberOfProcessors; -#elif HAVE_SYSCTL +#elif HAVE_SYSCTL && defined(HW_NCPU) int mib[2] = { CTL_HW, HW_NCPU }; size_t len = sizeof(nb_cpus); |