You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avutil/opencl: Fix volatile pointer
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
This commit is contained in:
@@ -37,7 +37,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "atomic.h"
|
#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 LOCK_OPENCL pthread_mutex_lock(atomic_opencl_lock)
|
||||||
#define UNLOCK_OPENCL pthread_mutex_unlock(atomic_opencl_lock)
|
#define UNLOCK_OPENCL pthread_mutex_unlock(atomic_opencl_lock)
|
||||||
#else
|
#else
|
||||||
@@ -363,7 +363,7 @@ static inline int init_opencl_mtx(void)
|
|||||||
av_free(tmp);
|
av_free(tmp);
|
||||||
return AVERROR(err);
|
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);
|
pthread_mutex_destroy(tmp);
|
||||||
av_free(tmp);
|
av_free(tmp);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user