avfilter/af_aiir: fix first denominator calculation
authorPaul B Mahol <onemda@gmail.com>
Fri, 22 May 2020 12:12:06 +0000 (14:12 +0200)
committerPaul B Mahol <onemda@gmail.com>
Fri, 22 May 2020 12:12:06 +0000 (14:12 +0200)
libavfilter/af_aiir.c

index 8b36281..bacdab6 100644 (file)
@@ -1038,8 +1038,9 @@ static int config_output(AVFilterLink *outlink)
             iir->ab[0][i] /= iir->ab[0][0];
         }
 
+        iir->ab[0][0] = 1.0;
         for (i = 0; i < iir->nb_ab[1]; i++) {
-            iir->ab[1][i] *= iir->g / iir->ab[0][0];
+            iir->ab[1][i] *= iir->g;
         }
 
         normalize_coeffs(ctx, ch);