From 072835898d321a6e3eb33e29331bc8d1ad7434a7 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Thu, 10 Dec 2020 23:39:49 +0100 Subject: [PATCH] avfilter/af_earwax: fix check that was left in previous commit Makes output exact with smaller number of samples per frame than taps. --- libavfilter/af_earwax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/af_earwax.c b/libavfilter/af_earwax.c index 921d0a4c04..a4434290a7 100644 --- a/libavfilter/af_earwax.c +++ b/libavfilter/af_earwax.c @@ -145,7 +145,7 @@ static void convolve(AVFilterContext *ctx, AVFrame *in, dst = scalarproduct(taps, taps + len, s->filter[filter_ch], dst); // process current input - if (2*in->nb_samples >= NUMTAPS ){ + if (in->nb_samples >= NUMTAPS) { endin = src + in->nb_samples - NUMTAPS; scalarproduct(src, endin, s->filter[filter_ch], dst);