[FFmpeg-devel] Patch: Enable OpenCL with Win32 threads
wm4
nfxjfg at googlemail.com
Wed Apr 16 15:55:22 CEST 2014
On Wed, 16 Apr 2014 23:22:59 +1000
Matt Oliver <protogonoi at gmail.com> wrote:
> -int av_opencl_set_option(const char *key, const char *val)
> +inline void init_opencl_ctx()
Misses a (void)...
> {
> - int ret = 0;
> - LOCK_OPENCL;
> +#if HAVE_THREADS
> + if (!avpriv_atomic_cas( &opencl_ctx.opt_init_flag, 0, 1 )) {
> + av_opt_set_defaults(&opencl_ctx);
> + pthread_mutex_init(&opencl_ctx.atomic_opencl_lock, NULL);
> + }
Could this just be integrated in the pthread_mutex_lock win32 wrapper
code to emulate PTHREAD_MUTEX_INITIALIZER?
More information about the ffmpeg-devel
mailing list