From patchwork Sun Aug 15 09:55:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29525 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp1104468iov; Sun, 15 Aug 2021 02:57:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwskJiJhyZXnambb762EzF1KCGxYAuzlYQoDnU1x074wnt+e4sRoC7CxBcXc1CqckoXHAe4 X-Received: by 2002:a17:906:a24c:: with SMTP id bi12mr11004811ejb.530.1629021453052; Sun, 15 Aug 2021 02:57:33 -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 g17si1656726edb.536.2021.08.15.02.57.32; Sun, 15 Aug 2021 02:57:33 -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; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=kh7jwnBt; arc=fail (body hash mismatch); 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E949468A40E; Sun, 15 Aug 2021 12:56:42 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2025.outbound.protection.outlook.com [40.92.91.25]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6B12868A15F for ; Sun, 15 Aug 2021 12:56:39 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lUe+kMr+17FL4YHchlImhcvpYahNAgTsWmTo8i/1DBqZ9O4WX1ds5c/lUz9kwoRAbxQu3onqoE8w7QXlQejEc1ZWUtG3ObB0SW46nt9kmC3f0onxHUVfY5s3BTDsuPST4Zkl5TMF8YtOIuf2AyvXIkST6+xDBLT6mSjFbp4tJOijflYer8m07M6IPpODP6fdnYz8N9JnCDBn2oza6avYxs9U53d2D7B+HWAk2+k5KhYUQnMsRauuQJL77phpUuaZczQS8l4+/6kCzV2+WO6LvWbxPePVlJ9H2tNEJBjS482p3zCqDlrvSGBK1aQeJvkxzYV4eSQRMisGwXZE/VVibA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yNQqy7mILvEie1oV8QhLKZl+4Iz3at+af3WPZxD6TmE=; b=iaTXrxorBlmUopPoYsE4oEk1Xd470YPFjNSYH0jD6vWrfYwx0GLTFmX7M4D/O8GX8tKzJeilmDS7eeUjEuDvJm83qlGXlWVuXc+woQFxSd+0HkHuQCIzMuEKGP5K9VrcvE5O7nlRZwsgyJjRg5UiAEBsMdt1ZRxmwvgvGo1BPGGLlM2vlIiy0CqlVGMZsie7mbgWMYLyo88NdUagxRRe3NchgQRdCnJORHa+0JkDf8S9cs8zhQG2JAri6t2Tp0oaKqxiTvPUXl/em53y8Pr1qEU2z6qMT024VplwdpfmtnRZnmN4SRk3gmeTyP/ixirpSf3IkCGOMTrZ4Mv6DA8Qsw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yNQqy7mILvEie1oV8QhLKZl+4Iz3at+af3WPZxD6TmE=; b=kh7jwnBtjS1N7pOjHygBPRvcFqjsshl1cO5Te5WORRhtugG02sIj6Wkt9dI/XhXcs+xe6CSfeuQmY0f2lWBkasJiBjd4zLswy3TywwX85oZxVba2Ct3wNtRiUoGLoxh8aUzORdgSwmlOO8u1oHlzaOP7KvtiO1tLAj/c+kCc72xNbZ8Q6pRWVQN3fySNZeQczKt8ZALRktoU2tkt1m1b4gM1vsrJv9bPPV4Wg6hjTaWTxhN4nl/MWZzTm4ptRe60WmfWooB+tf9R1RRwO/xD454G4MD5ia0EZlyVEY0+5Oa6XFAq8ejIhM4JhPu1K6xNAEuaeLVZ7UWw3gkJ3N3Oyw== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5542.eurprd03.prod.outlook.com (2603:10a6:20b:f8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.14; Sun, 15 Aug 2021 09:56:11 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ded:bace:bc7:e91d]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ded:bace:bc7:e91d%3]) with mapi id 15.20.4415.022; Sun, 15 Aug 2021 09:56:11 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 15 Aug 2021 11:55:38 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [eBUWoT1rFBd8fDqwlEsLQf8ZuGQr5Eev] X-ClientProxiedBy: AM4PR0202CA0005.eurprd02.prod.outlook.com (2603:10a6:200:89::15) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210815095538.2116202-9-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM4PR0202CA0005.eurprd02.prod.outlook.com (2603:10a6:200:89::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.16 via Frontend Transport; Sun, 15 Aug 2021 09:56:11 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fc4c1eba-ac57-4525-fe99-08d95fd2e97f X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UIMhWUD35g0FxUDNN6JTWbEpefnWOu8Pk4g2nyY5t1zC/PHTdRGlmXqD6zHA5MEk1uoaLdm095SimrZy/uNtmq3IeUHMD3Flndg0tlG6VGJDKiYk9W01C3nSIQMBLwi9ynK2SA2z4/oFRq26fSTU1TrWq6nVRYPiN4McBGC4LhBzNw5mcWucgFDG4KdDal7amaPlOFnxbBgmhtgYoEQLoV5owucfCJB8NM89h25HN3xT3jk9qcuDF6+oKTJhCjWhnlzf6GxISlGSXKfD+nqx17IpzNaIRZ4cVuN8pzf6yPuhbEyoHBCdghg9c+huhxi3p5d2QssOEv2GG/9Z9O+IkURysilPhhjLMTbOvrFDgp1VlQpqohx5cEtazTYAD4DvHd8c0EmhNw16jOiDXS9/5mMGB+VYTnkgSrHx2eKSDGM/N3IDfbWaRvt/zJ+Bn29s+kD2mDnCGjFy8F9Edl3UhSOQ1nYi7zPyZUxWsOQxu4PqXUEROxkfOtRgSw/yo+RD1AmcorEChveU916hcoYdrklPyZZsvPmDO5V2IVbHbDKgtArpTCpC/xqr/DPhdMjW5T2MfYqiC16vCjv5gk/rWkS32AOcAXywuxxJps9XQmeDwZUNjITBFrxJP8Sh7pfCqw1sgvo7IYh2GE0zFUVDzJgRvt7nRzg4NI6sl22ATKlamIfkn8q+aD37dQLMfev8mtT9t4vDjXV4A== X-MS-TrafficTypeDiagnostic: AM6PR03MB5542: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4ah+hJbkhCeEjRSb5yQhqYPXP2K77levuClZty7sGAF0Q0cw2Sh4bv3O/SUc8mHMoAWqEF2WZ+aUklkaaZPCccStGkLjMjLj+Zwrzo8zTsuHy3ggz7cmRCU6VL87AkGwyIesw2BcJf9ki1g+Y/r21ZKaA5raZ6+HR1Je1EKU711VYSqug+JhefjI5oAgBPpJTbCxiGkrRqwS21Sx9ee4tqBtIKr/CRy28QLOQB9Yvb8h7+fDNf7r53v31RouU7bHOneo4fuvQg96+VLDek7Igu/5T4MzAUwbb+wppP8LVxVgHQIAgKBobC51d2+sQd1/PgbN4iU66GcpuH5dTxSEAs3EdGPghVHkpx7U/GXj2uzptreBSU0BD5wQLB7etvqhkeFjzLAtWVRSz8ar7I6cpvC0GCA0GNnPrY3w2qEkSp+LZ00iOGskV5CBEZwpvV1H X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: BMHAilVnDsHKib8g3pmo8BXC/YKIFIOBVj7hj/rvlvtJ80tVxadMpIw123zovho1Lh1fNhr7S3VojkBkeHFwtp5I/Ww2lStBwLUAVkRH8ttg+BqlMtfEMI5Rf0/7X3GhZ2OUHFT06Gmrk7qDAaGFvA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fc4c1eba-ac57-4525-fe99-08d95fd2e97f X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2021 09:56:11.6778 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB5542 Subject: [FFmpeg-devel] [PATCH 10/10] avfilter/avfiltergraph: Remove dead checks X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: B9K2JtufCqqF These checks emit warnings in case the channel layouts lists are inconsistent; yet since 69f5f6ea375950b4845b241ee27054bfc8f00343 a function that is called earlier errors out if they are inconsistent. Signed-off-by: Andreas Rheinhardt --- This relies on no audio parts being set for video links, but this is indeed so since the last commit. libavfilter/avfiltergraph.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index 41a91a9bda..4f11d9a029 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -295,21 +295,6 @@ AVFilterContext *avfilter_graph_get_filter(AVFilterGraph *graph, const char *nam return NULL; } -static void sanitize_channel_layouts(void *log, AVFilterChannelLayouts *l) -{ - if (!l) - return; - if (l->nb_channel_layouts) { - if (l->all_layouts || l->all_counts) - av_log(log, AV_LOG_WARNING, "All layouts set on non-empty list\n"); - l->all_layouts = l->all_counts = 0; - } else { - if (l->all_counts && !l->all_layouts) - av_log(log, AV_LOG_WARNING, "All counts without all layouts\n"); - l->all_layouts = 1; - } -} - static int filter_link_check_formats(void *log, AVFilterLink *link, AVFilterFormatsConfig *cfg) { int ret; @@ -359,7 +344,7 @@ static int filter_check_formats(AVFilterContext *ctx) static int filter_query_formats(AVFilterContext *ctx) { - int ret, i; + int ret; AVFilterFormats *formats; AVFilterChannelLayouts *chlayouts; enum AVMediaType type = ctx->inputs && ctx->inputs [0] ? ctx->inputs [0]->type : @@ -376,11 +361,6 @@ static int filter_query_formats(AVFilterContext *ctx) if (ret < 0) return ret; - for (i = 0; i < ctx->nb_inputs; i++) - sanitize_channel_layouts(ctx, ctx->inputs[i]->outcfg.channel_layouts); - for (i = 0; i < ctx->nb_outputs; i++) - sanitize_channel_layouts(ctx, ctx->outputs[i]->incfg.channel_layouts); - formats = ff_all_formats(type); if ((ret = ff_set_common_formats(ctx, formats)) < 0) return ret;