avfilter/vf_neighbor_opencl: add error condition when filter name doesn't match

This cannot really happen, but to suppress compiler warnings, we can
just return AVERROR_BUG here.

Fixes: warning: variable 'kernel_name' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
(cherry picked from commit 1fa5e001bc)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Kacper Michajłow
2025-12-08 03:36:05 +01:00
committed by Michael Niedermayer
parent d7a8d211e5
commit 7da7407b90
+3
View File
@@ -68,6 +68,9 @@ static int neighbor_opencl_init(AVFilterContext *avctx)
kernel_name = "erosion_global";
} else if (!strcmp(avctx->filter->name, "dilation_opencl")){
kernel_name = "dilation_global";
} else {
err = AVERROR_BUG;
goto fail;
}
ctx->kernel = clCreateKernel(ctx->ocf.program, kernel_name, &cle);
CL_FAIL_ON_ERROR(AVERROR(EIO), "Failed to create "