From 91305c60261c77ad4a071062a21136fc0b6c5ab2 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Tue, 28 Apr 2015 13:02:38 +0530 Subject: OpenCL: Fix ABI incompatibility issues AVOpenCLDeviceNode and AVOpenCLPlatformNode used fixed static buffer for holding the device and platform name. This patch modifies these structures to use pointers instead. The memory required to hold the names is now dynamically allocated, the size for which is determined by querying appropriate OpenCL runtime APIs. Signed-off-by: Maneesh Gupta Signed-off-by: Michael Niedermayer --- libavutil/opencl.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'libavutil/opencl.h') diff --git a/libavutil/opencl.h b/libavutil/opencl.h index 0b7b8d4764..e423e5588a 100644 --- a/libavutil/opencl.h +++ b/libavutil/opencl.h @@ -44,21 +44,15 @@ #define AV_OPENCL_KERNEL( ... )# __VA_ARGS__ -#define AV_OPENCL_MAX_KERNEL_NAME_SIZE 150 - -#define AV_OPENCL_MAX_DEVICE_NAME_SIZE 100 - -#define AV_OPENCL_MAX_PLATFORM_NAME_SIZE 100 - typedef struct { int device_type; - char device_name[AV_OPENCL_MAX_DEVICE_NAME_SIZE]; + char *device_name; cl_device_id device_id; } AVOpenCLDeviceNode; typedef struct { cl_platform_id platform_id; - char platform_name[AV_OPENCL_MAX_PLATFORM_NAME_SIZE]; + char *platform_name; int device_num; AVOpenCLDeviceNode **device_node; } AVOpenCLPlatformNode; -- cgit v1.2.3