diff --git a/libavutil/buffer.c b/libavutil/buffer.c index 0f9f1a2992..b114afcbb1 100644 --- a/libavutil/buffer.c +++ b/libavutil/buffer.c @@ -25,8 +25,6 @@ #include "mem.h" #include "thread.h" -#define USE_ATOMICS !(HAVE_PTHREADS || HAVE_W32THREADS) - AVBufferRef *av_buffer_create(uint8_t *data, int size, void (*free)(void *opaque, uint8_t *data), void *opaque, int flags) diff --git a/libavutil/thread.h b/libavutil/thread.h index 973366182e..297b5b9a52 100644 --- a/libavutil/thread.h +++ b/libavutil/thread.h @@ -26,6 +26,8 @@ #if HAVE_PTHREADS || HAVE_W32THREADS || HAVE_OS2THREADS +#define USE_ATOMICS 0 + #if HAVE_PTHREADS #include #elif HAVE_OS2THREADS @@ -43,6 +45,8 @@ #else +#define USE_ATOMICS 1 + #define AVMutex char #define ff_mutex_init(mutex, attr) (0)