diff --git a/libavfilter/vf_neighbor_opencl.c b/libavfilter/vf_neighbor_opencl.c index b2939f841a..ba661bd665 100644 --- a/libavfilter/vf_neighbor_opencl.c +++ b/libavfilter/vf_neighbor_opencl.c @@ -42,7 +42,7 @@ typedef struct NeighborOpenCLContext { char *matrix_str[4]; - cl_float threshold[4]; + cl_float threshold[AV_VIDEO_MAX_PLANES]; cl_int coordinates; cl_mem coord; @@ -93,7 +93,7 @@ static int neighbor_opencl_make_filter_params(AVFilterContext *avctx) cl_int cle; int i; - for (i = 0; i < 4; i++) { + for (i = 0; i < AV_VIDEO_MAX_PLANES; i++) { ctx->threshold[i] /= 255.0; }