mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-13 17:07:21 +00:00
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:
committed by
Michael Niedermayer
parent
b8b30d90a5
commit
2e35c96557
@@ -69,6 +69,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 "
|
||||
|
||||
Reference in New Issue
Block a user