Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2018-11-28 03:16:30 +0300
committerMark Thompson <sw@jkqxz.net>2018-12-03 02:39:19 +0300
commit21608bc30303b221db8f3e2fb0952e7e7f2bd270 (patch)
treed841e372f1534dfbef51ed0a0c9924e9f1ff8510 /libavutil/hwcontext_opencl.c
parent2f6b1806ce2bc007a3a3596680a9f8089fb78145 (diff)
hwcontext_opencl: Use correct function to enumerate devices
Also assert that all required functions are present.
Diffstat (limited to 'libavutil/hwcontext_opencl.c')
-rw-r--r--libavutil/hwcontext_opencl.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavutil/hwcontext_opencl.c b/libavutil/hwcontext_opencl.c
index be71c8323e..d3df6221c4 100644
--- a/libavutil/hwcontext_opencl.c
+++ b/libavutil/hwcontext_opencl.c
@@ -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;