Commit 29c663d5 authored by drfer3's avatar drfer3 Committed by Mark Thompson

avfilter/vf_avgblur_opencl: fix error when clSetKernelArg fails

Fixes Coverity CID 1430382.
parent 213839ed
......@@ -155,18 +155,21 @@ static int avgblur_opencl_filter_frame(AVFilterLink *inlink, AVFrame *input)
if (cle != CL_SUCCESS) {
av_log(avctx, AV_LOG_ERROR, "Failed to set kernel "
"destination image argument: %d.\n", cle);
err = AVERROR_UNKNOWN;
goto fail;
}
cle = clSetKernelArg(ctx->kernel_horiz, 1, sizeof(cl_mem), &src);
if (cle != CL_SUCCESS) {
av_log(avctx, AV_LOG_ERROR, "Failed to set kernel "
"source image argument: %d.\n", cle);
err = AVERROR_UNKNOWN;
goto fail;
}
cle = clSetKernelArg(ctx->kernel_horiz, 2, sizeof(cl_int), &radius_x);
if (cle != CL_SUCCESS) {
av_log(avctx, AV_LOG_ERROR, "Failed to set kernel "
"sizeX argument: %d.\n", cle);
err = AVERROR_UNKNOWN;
goto fail;
}
......@@ -193,18 +196,21 @@ static int avgblur_opencl_filter_frame(AVFilterLink *inlink, AVFrame *input)
if (cle != CL_SUCCESS) {
av_log(avctx, AV_LOG_ERROR, "Failed to set kernel "
"destination image argument: %d.\n", cle);
err = AVERROR_UNKNOWN;
goto fail;
}
cle = clSetKernelArg(ctx->kernel_vert, 1, sizeof(cl_mem), &inter);
if (cle != CL_SUCCESS) {
av_log(avctx, AV_LOG_ERROR, "Failed to set kernel "
"source image argument: %d.\n", cle);
err = AVERROR_UNKNOWN;
goto fail;
}
cle = clSetKernelArg(ctx->kernel_vert, 2, sizeof(cl_int), &radius_y);
if (cle != CL_SUCCESS) {
av_log(avctx, AV_LOG_ERROR, "Failed to set kernel "
"sizeY argument: %d.\n", cle);
err = AVERROR_UNKNOWN;
goto fail;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment