[FFmpeg-cvslog] avfilter/vf_avgblur_opencl: fix error when clSetKernelArg fails

drfer3 git at videolan.org
Tue Mar 27 01:14:30 EEST 2018


ffmpeg | branch: master | drfer3 <drfer3 at student.monash.edu> | Mon Mar 26 11:08:03 2018 +1100| [29c663d50cbf590e9d225ace2d36a80fb8cbd8d3] | committer: Mark Thompson

avfilter/vf_avgblur_opencl: fix error when clSetKernelArg fails

Fixes Coverity CID 1430382.

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

 libavfilter/vf_avgblur_opencl.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavfilter/vf_avgblur_opencl.c b/libavfilter/vf_avgblur_opencl.c
index 3a5b4a28ca..48cebb5887 100644
--- a/libavfilter/vf_avgblur_opencl.c
+++ b/libavfilter/vf_avgblur_opencl.c
@@ -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;
         }
 



More information about the ffmpeg-cvslog mailing list