On Wed, Dec 24, 2014 at 07:02:11PM +0000, Titov, Alexey wrote: > Patch attached > diff --git a/libavutil/opencl.c b/libavutil/opencl.c index 36cb6fe..3cd2bf8 100644 --- a/libavutil/opencl.c +++ b/libavutil/opencl.c @@ -449,10 +449,32 @@ cl_program av_opencl_compile(const char *program_name, const char *build_opts) } status = clBuildProgram(program, 1, &(opencl_ctx.device_id), build_opts, NULL, NULL); if (status != CL_SUCCESS) { + size_t log_size; + char *log; av_log(&opencl_ctx, AV_LOG_ERROR, - "Compilation failed with OpenCL program: %s\n", program_name); + "Compilation failed with OpenCL program: '%s' with error %d \n", program_name, status); + + // Determine the size of the log + clGetProgramBuildInfo(program, opencl_ctx.device_id, CL_PROGRAM_BUILD_LOG, 0, NULL, &log_size); + + if( log_size <= AV_OPENCL_MAX_PROG_BUILD_LOG_SIZE) { + + // Allocate memory for the log + log = av_malloc(log_size+1); + + // Get the log + clGetProgramBuildInfo(program, opencl_ctx.device_id, CL_PROGRAM_BUILD_LOG, log_size, log, NULL); + log[log_size] = '\0';
missing malloc failure check indention depth is not what it is in the surrounding code [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB During times of universal deceit, telling the truth becomes a revolutionary act. -- George Orwell
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel