Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanil Iashchenko <danyaschenko@gmail.com>2018-07-09 15:41:48 +0300
committerMark Thompson <sw@jkqxz.net>2018-07-12 01:17:04 +0300
commit2bdb6b64969f3d068cf0ec1a3f95eabbe9fd90d1 (patch)
tree97ad4bff29fdbbcf1346654cfbd14b32d96a935d /libavfilter/vf_avgblur_opencl.c
parent923ee63d6cd140e1f957c838b1d062ca4fb73580 (diff)
lavfi/avgblur_opencl: fix using uninitialized value
Fixed using uninitialized value "global_work[0]" when calling "av_log". Fixes CID #1437471.
Diffstat (limited to 'libavfilter/vf_avgblur_opencl.c')
-rw-r--r--libavfilter/vf_avgblur_opencl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/vf_avgblur_opencl.c b/libavfilter/vf_avgblur_opencl.c
index 99ed1ca307..f0e5f01e04 100644
--- a/libavfilter/vf_avgblur_opencl.c
+++ b/libavfilter/vf_avgblur_opencl.c
@@ -205,10 +205,6 @@ static int avgblur_opencl_filter_frame(AVFilterLink *inlink, AVFrame *input)
radius_y = 0;
}
- av_log(avctx, AV_LOG_DEBUG, "Run kernel on plane %d "
- "(%"SIZE_SPECIFIER"x%"SIZE_SPECIFIER").\n",
- p, global_work[0], global_work[1]);
-
for (i = 0; i < ctx->power[p]; i++) {
CL_SET_KERNEL_ARG(ctx->kernel_horiz, 0, cl_mem, &inter);
CL_SET_KERNEL_ARG(ctx->kernel_horiz, 1, cl_mem, i == 0 ? &src : &dst);
@@ -223,6 +219,10 @@ static int avgblur_opencl_filter_frame(AVFilterLink *inlink, AVFrame *input)
if (err < 0)
goto fail;
+ av_log(avctx, AV_LOG_DEBUG, "Run kernel on plane %d "
+ "(%"SIZE_SPECIFIER"x%"SIZE_SPECIFIER").\n",
+ p, global_work[0], global_work[1]);
+
cle = clEnqueueNDRangeKernel(ctx->command_queue, ctx->kernel_horiz, 2, NULL,
global_work, NULL,
0, NULL, NULL);