ffmpeg | branch: master | Timo Rothenpieler <t...@rothenpieler.org> | Thu Sep 24 16:58:30 2015 +0200| [31ee86cd9869200c69f39ac7fbe648cee2dace68] | committer: Timo Rothenpieler
avutil/opencl: Fix volatile pointer Reviewed-by: Michael Niedermayer <mich...@niedermayer.cc> Signed-off-by: Timo Rothenpieler <t...@rothenpieler.org> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=31ee86cd9869200c69f39ac7fbe648cee2dace68 --- libavutil/opencl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/opencl.c b/libavutil/opencl.c index 1d78214..8686493 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); } _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog