vf_program_opencl: Add missing error code returns
authorMark Thompson <sw@jkqxz.net>
Wed, 10 Jan 2018 23:27:19 +0000 (23:27 +0000)
committerMark Thompson <sw@jkqxz.net>
Wed, 10 Jan 2018 23:27:19 +0000 (23:27 +0000)
Fixes CID #1427285.

libavfilter/vf_program_opencl.c

index d49365a..4ee9668 100644 (file)
@@ -116,12 +116,14 @@ static int program_opencl_run(AVFilterContext *avctx)
         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, 1, sizeof(cl_uint), &ctx->index);
         if (cle != CL_SUCCESS) {
             av_log(avctx, AV_LOG_ERROR, "Failed to set kernel "
                    "index argument: %d.\n", cle);
+            err = AVERROR_UNKNOWN;
             goto fail;
         }
 
@@ -135,6 +137,7 @@ static int program_opencl_run(AVFilterContext *avctx)
             if (cle != CL_SUCCESS) {
                 av_log(avctx, AV_LOG_ERROR, "Failed to set kernel "
                        "source image argument %d: %d.\n", input, cle);
+                err = AVERROR_UNKNOWN;
                 goto fail;
             }
         }