mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-23 11:39:49 +00:00
hwcontext_opencl: Use correct function to enumerate devices
Also assert that all required functions are present.
This commit is contained in:
parent
2f6b1806ce
commit
21608bc303
@ -500,6 +500,9 @@ static int opencl_device_create_internal(AVHWDeviceContext *hwdev,
|
||||
*device_name_src = NULL;
|
||||
int err, found, p, d;
|
||||
|
||||
av_assert0(selector->enumerate_platforms &&
|
||||
selector->enumerate_devices);
|
||||
|
||||
err = selector->enumerate_platforms(hwdev, &nb_platforms, &platforms,
|
||||
selector->context);
|
||||
if (err)
|
||||
@ -531,9 +534,9 @@ static int opencl_device_create_internal(AVHWDeviceContext *hwdev,
|
||||
continue;
|
||||
}
|
||||
|
||||
err = opencl_enumerate_devices(hwdev, platforms[p], platform_name,
|
||||
&nb_devices, &devices,
|
||||
selector->context);
|
||||
err = selector->enumerate_devices(hwdev, platforms[p], platform_name,
|
||||
&nb_devices, &devices,
|
||||
selector->context);
|
||||
if (err < 0)
|
||||
continue;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user