mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-25 00:10:00 +01: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>
This commit is contained in:
committed by
James Almer
parent
69b4474367
commit
1fa5e001bc
@@ -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