Re: [FFmpeg-devel] [PATCH 1/3] avutil/opencl: Fix volatile pointer
> On Thu, Sep 24, 2015 at 05:12:23PM +0200, Timo Rothenpieler wrote: >> --- >> libavutil/opencl.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) > > LGTM pushed this one. If anyone with OpenCL experience could have a look at the other two, that'd be highly apreciated. I never worked with OpenCL before and it's quite possible that i made some mistakes that degrade performance or something like that. signature.asc Description: OpenPGP digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/3] avutil/opencl: Fix volatile pointer
On Thu, Sep 24, 2015 at 05:12:23PM +0200, Timo Rothenpieler wrote: > --- > libavutil/opencl.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) LGTM [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Avoid a single point of failure, be that a person or equipment. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/3] avutil/opencl: Fix volatile pointer
--- 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); } -- 2.5.3 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel