From patchwork Mon Sep 5 23:13:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 443 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.134 with SMTP id o128csp308538vsd; Mon, 5 Sep 2016 16:17:37 -0700 (PDT) X-Received: by 10.28.99.86 with SMTP id x83mr17800818wmb.95.1473117457559; Mon, 05 Sep 2016 16:17:37 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id n89si20256756wmi.45.2016.09.05.16.17.35; Mon, 05 Sep 2016 16:17:37 -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 455F0689D6C; Tue, 6 Sep 2016 02:17:24 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe04-1.mx.upcmail.net (vie01a-dmta-pe04-1.mx.upcmail.net [62.179.121.163]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 216E0689C46 for ; Tue, 6 Sep 2016 02:17:18 +0300 (EEST) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe04.mx.upcmail.net with esmtp (Exim 4.87) (envelope-from ) id 1bh38o-00050Y-OR for ffmpeg-devel@ffmpeg.org; Tue, 06 Sep 2016 01:17:26 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id fzHR1t00X0S5wYM01zHSf7; Tue, 06 Sep 2016 01:17:26 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 6 Sep 2016 01:13:52 +0200 Message-Id: <20160905231353.32269-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.9.3 Subject: [FFmpeg-devel] [PATCH 1/2] avfilter/avf_concat: Make independent of the channel layout 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Michael Niedermayer --- libavfilter/avf_concat.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavfilter/avf_concat.c b/libavfilter/avf_concat.c index 4fa9447..56e4179 100644 --- a/libavfilter/avf_concat.c +++ b/libavfilter/avf_concat.c @@ -260,7 +260,6 @@ static int send_silence(AVFilterContext *ctx, unsigned in_no, unsigned out_no, int frame_nb_samples, ret; AVRational rate_tb = { 1, ctx->inputs[in_no]->sample_rate }; AVFrame *buf; - int nb_channels = av_get_channel_layout_nb_channels(outlink->channel_layout); if (!rate_tb.den) return AVERROR_BUG; @@ -273,7 +272,7 @@ static int send_silence(AVFilterContext *ctx, unsigned in_no, unsigned out_no, if (!buf) return AVERROR(ENOMEM); av_samples_set_silence(buf->extended_data, 0, frame_nb_samples, - nb_channels, outlink->format); + outlink->channels, outlink->format); buf->pts = base_pts + av_rescale_q(sent, rate_tb, outlink->time_base); ret = ff_filter_frame(outlink, buf); if (ret < 0)