summaryrefslogtreecommitdiff
path: root/libavutil/opencl.c
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2015-09-24 16:58:30 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2015-09-26 20:28:29 +0200
commit31ee86cd9869200c69f39ac7fbe648cee2dace68 (patch)
tree9c7478ef636d5b774358a8804ca26d233f06da31 /libavutil/opencl.c
parentdb9de9b954a7dd453e928d17d7521915afe86764 (diff)
avutil/opencl: Fix volatile pointer
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
Diffstat (limited to 'libavutil/opencl.c')
-rw-r--r--libavutil/opencl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/opencl.c b/libavutil/opencl.c
index 1d78214588..868649321f 100644
--- a/libavutil/opencl.c
+++ b/libavutil/opencl.c
@@ -37,7 +37,7 @@
#endif
#include "atomic.h"
-static volatile pthread_mutex_t *atomic_opencl_lock = NULL;
+static pthread_mutex_t * volatile atomic_opencl_lock = NULL;
#define LOCK_OPENCL pthread_mutex_lock(atomic_opencl_lock)
#define UNLOCK_OPENCL pthread_mutex_unlock(atomic_opencl_lock)
#else
@@ -363,7 +363,7 @@ static inline int init_opencl_mtx(void)
av_free(tmp);
return AVERROR(err);
}
- if (avpriv_atomic_ptr_cas(&atomic_opencl_lock, NULL, tmp)) {
+ if (avpriv_atomic_ptr_cas((void * volatile *)&atomic_opencl_lock, NULL, tmp)) {
pthread_mutex_destroy(tmp);
av_free(tmp);
}