[FFmpeg-cvslog] vf_program_opencl: Add missing error code returns

Mark Thompson git at videolan.org
Thu Jan 11 01:37:00 EET 2018


ffmpeg | branch: master | Mark Thompson <sw at jkqxz.net> | Wed Jan 10 23:27:19 2018 +0000| [526a87b47124bfd2d57901d1b9abd6d322eaf293] | committer: Mark Thompson

vf_program_opencl: Add missing error code returns

Fixes CID #1427285.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=526a87b47124bfd2d57901d1b9abd6d322eaf293
---

 libavfilter/vf_program_opencl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavfilter/vf_program_opencl.c b/libavfilter/vf_program_opencl.c
index d49365aa55..4ee9668236 100644
--- a/libavfilter/vf_program_opencl.c
+++ b/libavfilter/vf_program_opencl.c
@@ -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;
             }
         }



More information about the ffmpeg-cvslog mailing list