#endif
static int opencl_device_derive(AVHWDeviceContext *hwdev,
- AVHWDeviceContext *src_ctx,
+ AVHWDeviceContext *src_ctx, AVDictionary *opts,
int flags)
{
int err;
// Surface mapping works via DRM PRIME fds with no special
// initialisation required in advance. This just finds the
// Beignet ICD by name.
- AVDictionary *opts = NULL;
+ AVDictionary *selector_opts = NULL;
- err = av_dict_set(&opts, "platform_vendor", "Intel", 0);
+ err = av_dict_set(&selector_opts, "platform_vendor", "Intel", 0);
if (err >= 0)
- err = av_dict_set(&opts, "platform_version", "beignet", 0);
+ err = av_dict_set(&selector_opts, "platform_version", "beignet", 0);
if (err >= 0) {
OpenCLDeviceSelector selector = {
.platform_index = -1,
.device_index = 0,
- .context = opts,
+ .context = selector_opts,
.enumerate_platforms = &opencl_enumerate_platforms,
.filter_platform = &opencl_filter_platform,
.enumerate_devices = &opencl_enumerate_devices,
};
err = opencl_device_create_internal(hwdev, &selector, NULL);
}
- av_dict_free(&opts);
+ av_dict_free(&selector_opts);
}
break;
#endif
av_free(desc);
}
-static AVBufferRef *opencl_pool_alloc(void *opaque, int size)
+static AVBufferRef *opencl_pool_alloc(void *opaque, size_t size)
{
AVHWFramesContext *hwfc = opaque;
AVOpenCLDeviceContext *hwctx = hwfc->device_ctx->hwctx;