lavfi/af_pan: fix sign handling in channel coefficient parser
authorMichael Roitzsch <reactorcontrol@icloud.com>
Sat, 18 Nov 2017 12:33:08 +0000 (13:33 +0100)
committerTobias Rapp <t.rapp@noa-archive.com>
Wed, 22 Nov 2017 09:42:07 +0000 (10:42 +0100)
When a channel formula ends with a subtraction, the next formula will
otherwise have its first coefficient negated.

(cherry picked from commit 4f4e19914ddca5096bf7639c7c99a9045e436e8b)

libavfilter/af_pan.c

index a477bde..e54f715 100644 (file)
@@ -166,6 +166,7 @@ static av_cold int init(AVFilterContext *ctx)
             goto fail;
         }
         /* gains */
+        sign = 1;
         while (1) {
             gain = 1;
             if (sscanf(arg, "%lf%n *%n", &gain, &len, &len))