From patchwork Sat Mar 24 22:00:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 8145 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.1.70 with SMTP id c67csp1923132jad; Sat, 24 Mar 2018 15:00:45 -0700 (PDT) X-Google-Smtp-Source: AG47ELthLB4A+P1P7HicCFQ7VQ9yYUloMjldwWp90qpD/KQHombqFTtocSRt3usuIkl+ckUtq9ud X-Received: by 10.28.48.70 with SMTP id w67mr11486631wmw.47.1521928845528; Sat, 24 Mar 2018 15:00:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521928845; cv=none; d=google.com; s=arc-20160816; b=oKQ3Z8UhZ9+zS76o4AC5TntqT+kOdwl1W9g0kMonyGw3KMs7EqbYHNW/4aFTt3t43v HmigPQZbNL+PIt4a8Rdj8qWktfmLqvuEG+i7bwcWysbrKbYqCS5x55naKLUabZjsuadW qmIW1MHgFVSYnmYMcL4E7biUK8f/Jh2dNc1/9JTgzTRDYrKQv4mL8/NNyugXXuppLHLK HTKZI/ozNQKIpa9Xv4K6mSFd6ekV4njtP80LS+NCbz81/Kwjju4ZAmNTS0/O648/vxWn SLZccgM9PBbUB4RWbvLKkBeykgYNXcah52xmjNxZzgNPmqxzv+P8YEmCuSkr4fU3L/SF qPjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:delivered-to :arc-authentication-results; bh=q2Gq+AXOdekMYJAUUXaQXNDlfiqL65PK7hE0bxbPRvs=; b=bwM+jpX30EHRKeZJiOW/3IPYxH4XJ/z4E82hR2pHZRMKPafN4nPxu1lW9HnjbNAM9n ppT3v5MFhUEKkYkJWkKuDHtE1Zu7nFMhaKwD3jeHtkaf4JH3FP33QlSxVWRMSES6eZQf iN4X/x+AwmfVc1MVCE8X1ndgGwzwZNAlcCNJ5JruiXnH4uvLl7LCC5aqU+3sysbPaejs JKBxExGn1qP8xcVT+8ew8p2wxsv9jogajqCFTj+JbBoz2GhTeU5SPATiWQodXJB6pgkS Ff9IBVOibPTuz0sR3ckD7IWnrqjJHJPN8cN9CN9omJH7lyPBSnab9NTAeC5flpq5qeG/ RlqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 24si4137779wrv.251.2018.03.24.15.00.44; Sat, 24 Mar 2018 15:00:45 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0ED9C689CC2; Sun, 25 Mar 2018 00:00:27 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F3214680B87 for ; Sun, 25 Mar 2018 00:00:20 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 6633EE10EF; Sat, 24 Mar 2018 23:00:37 +0100 (CET) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qMTNY6-jWkXv; Sat, 24 Mar 2018 23:00:36 +0100 (CET) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 717B6E10EC; Sat, 24 Mar 2018 23:00:36 +0100 (CET) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Sat, 24 Mar 2018 23:00:32 +0100 Message-Id: <20180324220032.20158-1-cus@passwd.hu> X-Mailer: git-send-email 2.13.6 Subject: [FFmpeg-devel] [PATCH] avfilter/af_pan: parse properly expressions referencing the same channel multiple times X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Marton Balint MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Fixes parsing of expressions like c0=c0+c0. Previously no error was thrown and only the last gain factor was used. Signed-off-by: Marton Balint --- libavfilter/af_pan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/af_pan.c b/libavfilter/af_pan.c index d8a63a7952..148ac9f643 100644 --- a/libavfilter/af_pan.c +++ b/libavfilter/af_pan.c @@ -184,7 +184,7 @@ static av_cold int init(AVFilterContext *ctx) ret = AVERROR(EINVAL); goto fail; } - pan->gain[out_ch_id][in_ch_id] = sign * gain; + pan->gain[out_ch_id][in_ch_id] += sign * gain; skip_spaces(&arg); if (!*arg) break;