On Mon, Apr 27, 2015 at 07:51:33AM +0000, Gupta, Maneesh wrote: > Hi, > > This patch attempts to fix the ABI incompatibility issues in the OpenCL code. > Please review it and let me know if there is anything that I missed > addressing in this patch. > > Regards, > Maneesh
> opencl.c | 42 ++++++++++++++++++++++++++++++++++++++---- > opencl.h | 10 ++-------- > 2 files changed, 40 insertions(+), 12 deletions(-) > 091096c9ceb25f09140cbf6e4551c879a84696b4 > 0001-OpenCL-Fix-ABI-incompatibility-issues.patch > From 29a69771bd95e230525b67f24694a68ac8ebbade Mon Sep 17 00:00:00 2001 > From: Maneesh Gupta <[email protected]> > Date: Sat, 25 Apr 2015 11:16:35 +0530 > Subject: [PATCH 1/2] OpenCL: Fix ABI incompatibility issues this commit message is unacceptable its too terse please explain, what is changed, why it is changed, and how this is achived in the commit message > > Signed-off-by: Maneesh Gupta <[email protected]> > --- > libavutil/opencl.c | 42 ++++++++++++++++++++++++++++++++++++++---- > libavutil/opencl.h | 10 ++-------- > 2 files changed, 40 insertions(+), 12 deletions(-) > > diff --git a/libavutil/opencl.c b/libavutil/opencl.c > index 2df5653..38a4d6f 100644 > --- a/libavutil/opencl.c > +++ b/libavutil/opencl.c > @@ -181,9 +181,11 @@ static void free_device_list(AVOpenCLDeviceList > *device_list) > if (!device_list->platform_node[i]) > continue; > for (j = 0; j < device_list->platform_node[i]->device_num; j++) { > + > av_freep(&(device_list->platform_node[i]->device_node[j]->device_name)); > av_freep(&(device_list->platform_node[i]->device_node[j])); > } > av_freep(&device_list->platform_node[i]->device_node); > + av_freep(&(device_list->platform_node[i]->platform_name)); > av_freep(&device_list->platform_node[i]); > } > av_freep(&device_list->platform_node); > @@ -198,6 +200,8 @@ static int get_device_list(AVOpenCLDeviceList > *device_list) > cl_platform_id *platform_ids = NULL; > cl_device_id *device_ids = NULL; > AVOpenCLDeviceNode *device_node = NULL; > + size_t platform_name_size = 0; > + size_t device_name_size = 0; > status = clGetPlatformIDs(0, NULL, &device_list->platform_num); > if (status != CL_SUCCESS) { > av_log(&opencl_ctx, AV_LOG_ERROR, > @@ -232,8 +236,25 @@ static int get_device_list(AVOpenCLDeviceList > *device_list) > } > device_list->platform_node[i]->platform_id = platform_ids[i]; > status = clGetPlatformInfo(platform_ids[i], CL_PLATFORM_VENDOR, > - > sizeof(device_list->platform_node[i]->platform_name), > - > device_list->platform_node[i]->platform_name, NULL); > + 0, NULL, &platform_name_size); > + if (status != CL_SUCCESS) { > + av_log(&opencl_ctx, AV_LOG_WARNING, > + "Could not get size of platform name: %s\n", > av_opencl_errstr(status)); > + } else { > + device_list->platform_node[i]->platform_name = > (char*)av_malloc(platform_name_size * sizeof(char)); useless cast [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB it is not once nor twice but times without number that the same ideas make their appearance in the world. -- Aristotle
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
