diff --git a/libavfilter/af_atempo.c b/libavfilter/af_atempo.c index 1ccc3f5629..92390cf217 100644 --- a/libavfilter/af_atempo.c +++ b/libavfilter/af_atempo.c @@ -654,7 +654,7 @@ static int yae_align(AudioFragment *frag, // normalize: FFTSample drifti = (FFTSample)(drift + i); - metric *= drifti; + metric *= drifti * (FFTSample)(i - i0) * (FFTSample)(i1 - i); if (metric > best_metric) { best_metric = metric;