[FFmpeg-cvslog] avutil/buffer: Move USE_ATOMICS to thread.h to avoid it becoming out of sync with it

Michael Niedermayer git at videolan.org
Sat Nov 29 13:20:14 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Nov 29 12:06:03 2014 +0100| [c299b6fd080743afa7d46f217eced54935d95bff] | committer: Michael Niedermayer

avutil/buffer: Move USE_ATOMICS to thread.h to avoid it becoming out of sync with it

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c299b6fd080743afa7d46f217eced54935d95bff
---

 libavutil/buffer.c |    2 --
 libavutil/thread.h |    4 ++++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavutil/buffer.c b/libavutil/buffer.c
index 0f9f1a2..b114afc 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 9733661..297b5b9 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 <pthread.h>
 #elif HAVE_OS2THREADS
@@ -43,6 +45,8 @@
 
 #else
 
+#define USE_ATOMICS 1
+
 #define AVMutex char
 
 #define ff_mutex_init(mutex, attr) (0)



More information about the ffmpeg-cvslog mailing list