1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

ocl: fix PlatformInfo usage

This commit is contained in:
Alexander Alekhin
2020-09-25 19:22:12 +00:00
parent c32e349332
commit c945ea125a
4 changed files with 7 additions and 13 deletions
+1 -7
View File
@@ -141,13 +141,7 @@ Context& initializeContextFromVA(VADisplay display, bool tryInterop)
contextInitialized = true;
cl_platform_id platform = platforms[found];
char platformName[1024] = {0};
size_t sz = 0;
if (clGetPlatformInfo(platform, CL_PLATFORM_NAME, sizeof(platformName) - 16, platformName, &sz) != CL_SUCCESS
|| sz >= sizeof(platformName))
{
CV_Error(cv::Error::OpenCLInitError, "OpenCL: Failed to get platform name");
}
std::string platformName = PlatformInfo(&platform).name();
OpenCLExecutionContext clExecCtx;
try