Skip to content
Snippets Groups Projects
Commit 29c663d5 authored by drfer3's avatar drfer3 Committed by Mark Thompson
Browse files

avfilter/vf_avgblur_opencl: fix error when clSetKernelArg fails

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