1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

vf_program_opencl: Add missing error code returns

Fixes CID #1427285.
This commit is contained in:
Mark Thompson 2018-01-10 23:27:19 +00:00
parent 9b4611a1c1
commit 526a87b471

View File

@ -116,12 +116,14 @@ static int program_opencl_run(AVFilterContext *avctx)
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, 1, sizeof(cl_uint), &ctx->index); cle = clSetKernelArg(ctx->kernel, 1, sizeof(cl_uint), &ctx->index);
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 "
"index argument: %d.\n", cle); "index argument: %d.\n", cle);
err = AVERROR_UNKNOWN;
goto fail; goto fail;
} }
@ -135,6 +137,7 @@ static int program_opencl_run(AVFilterContext *avctx)
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: %d.\n", input, cle); "source image argument %d: %d.\n", input, cle);
err = AVERROR_UNKNOWN;
goto fail; goto fail;
} }
} }