[FFmpeg-cvslog] opencl: Make init_mtx static with volatile lock

Matt Oliver git at videolan.org
Sat May 10 15:36:44 CEST 2014


ffmpeg | branch: master | Matt Oliver <protogonoi at gmail.com> | Sat May 10 21:00:32 2014 +1000| [c6bf660bef8f3a9430d46a0b5b45ccc2846b6194] | committer: Michael Niedermayer

opencl: Make init_mtx static with volatile lock

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

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

 libavutil/opencl.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavutil/opencl.c b/libavutil/opencl.c
index 3eb0ed0..a92bce7 100644
--- a/libavutil/opencl.c
+++ b/libavutil/opencl.c
@@ -37,7 +37,7 @@
 #endif
 #include "atomic.h"
 
-static pthread_mutex_t *atomic_opencl_lock = NULL;
+static volatile pthread_mutex_t *atomic_opencl_lock = NULL;
 #define LOCK_OPENCL pthread_mutex_lock(atomic_opencl_lock)
 #define UNLOCK_OPENCL pthread_mutex_unlock(atomic_opencl_lock)
 #else
@@ -326,7 +326,7 @@ void av_opencl_free_device_list(AVOpenCLDeviceList **device_list)
     av_freep(device_list);
 }
 
-inline int init_opencl_mtx(void)
+static inline int init_opencl_mtx(void)
 {
 #if HAVE_THREADS
     if (!atomic_opencl_lock) {



More information about the ffmpeg-cvslog mailing list