From patchwork Mon Nov 21 01:09:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 1504 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.90.1 with SMTP id o1csp1328060vsb; Sun, 20 Nov 2016 17:10:04 -0800 (PST) X-Received: by 10.194.234.198 with SMTP id ug6mr2106251wjc.10.1479690604883; Sun, 20 Nov 2016 17:10:04 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id pp3si17534493wjb.160.2016.11.20.17.10.04; Sun, 20 Nov 2016 17:10:04 -0800 (PST) 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 5BBB168A077; Mon, 21 Nov 2016 03:09:59 +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 78B9A6898D3 for ; Mon, 21 Nov 2016 03:09:52 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id D5FF5100C00; Mon, 21 Nov 2016 02:09:54 +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 uxbdbXgfCxoZ; Mon, 21 Nov 2016 02:09:53 +0100 (CET) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id F209310080C; Mon, 21 Nov 2016 02:09:52 +0100 (CET) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Mon, 21 Nov 2016 02:09:37 +0100 Message-Id: <20161121010937.1307-1-cus@passwd.hu> X-Mailer: git-send-email 2.10.0 Subject: [FFmpeg-devel] [PATCH] lavfi/avfiltergraph: always reduce all_layouts to a single 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 Cc: george@nsup.org, Marton Balint MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This reverts d300f5f6f570659e4b58567b35c9e8600c9f2956. Further reference: https://ffmpeg.org/pipermail/ffmpeg-devel/2013-October/149935.html I can't reproduce ticket #2899 so I am not sure the original patch is still needed. Reverting it fixes unknown channel layout support for trivial resamples, such as: ffmpeg -f lavfi -i "aevalsrc=0|0|0|0|0|0|0|0|0:d=1,asetnsamples" -f null none Signed-off-by: Marton Balint --- libavfilter/avfiltergraph.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index 3af698d..379bc1a 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -802,8 +802,7 @@ static int reduce_formats_on_filter(AVFilterContext *filter) if (inlink->type != outlink->type || fmts->nb_channel_layouts == 1) continue; - if (fmts->all_layouts && - (!FF_LAYOUT2COUNT(fmt) || fmts->all_counts)) { + if (fmts->all_layouts) { /* Turn the infinite list into a singleton */ fmts->all_layouts = fmts->all_counts = 0; if (ff_add_channel_layout(&outlink->in_channel_layouts, fmt) < 0)