diff --git a/spa/plugins/audioconvert/channelmix-ops.c b/spa/plugins/audioconvert/channelmix-ops.c index 015d285ed..cabc556b8 100644 --- a/spa/plugins/audioconvert/channelmix-ops.c +++ b/spa/plugins/audioconvert/channelmix-ops.c @@ -776,7 +776,7 @@ int channelmix_init(struct channelmix *mix) mix->func_name = info->name; if (mix->hilbert_taps > 0) { - mix->n_taps = SPA_CLAMP(mix->hilbert_taps, 15u, 255u) | 1; + mix->n_taps = SPA_CLAMP(mix->hilbert_taps, 15u, MAX_TAPS) | 1; blackman_window(mix->taps, mix->n_taps); hilbert_generate(mix->taps, mix->n_taps); reverse_taps(mix->taps, mix->n_taps); diff --git a/spa/plugins/audioconvert/channelmix-ops.h b/spa/plugins/audioconvert/channelmix-ops.h index dfc0bccde..4f6249c3c 100644 --- a/spa/plugins/audioconvert/channelmix-ops.h +++ b/spa/plugins/audioconvert/channelmix-ops.h @@ -24,7 +24,7 @@ #define MASK_7_1 _M(FL)|_M(FR)|_M(FC)|_M(LFE)|_M(SL)|_M(SR)|_M(RL)|_M(RR) #define BUFFER_SIZE 4096 -#define MAX_TAPS 255 +#define MAX_TAPS 255u struct channelmix { uint32_t src_chan;