From patchwork Thu Sep 30 13:39:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30761 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp691804iob; Thu, 30 Sep 2021 06:52:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwawG9gHBF6qNeA9E7UzemU1LFWWA+daFO1XO/dp8R7uXBPyc6cV++U7/H70Lanf1tZvwA0 X-Received: by 2002:a17:906:a3c4:: with SMTP id ca4mr6755892ejb.529.1633009940558; Thu, 30 Sep 2021 06:52:20 -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 d29si3684351ejo.60.2021.09.30.06.52.20; Thu, 30 Sep 2021 06:52:20 -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=cPrV7Hsp; 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 F2CDB68AD62; Thu, 30 Sep 2021 16:45:59 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-oln040092069012.outbound.protection.outlook.com [40.92.69.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 47A5D6898F5 for ; Thu, 30 Sep 2021 16:45:54 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NWaNsaVt/XEGJRhexI0gorzQ8HxMVpp1Ghmfl86rkPVSNe6k79+WOFxluchpQFAvUzRHqXWa0RtFCGEiI4wjAw8zC7uwTtPCa401MXi/p/1w0hu0vqGSGHC5Y37W+O6Hdzw8mme0tM91/Ruq5EXxhfmRUTM/IzmRwrwPbJLQbXFDQGJ5MHjsHSqLI762q1Tr4KAMKSQc2oFbGzZCBGv15V34lB3/H/gEirh+2q2L5/caCbtqnKq1roh/+/qS1qKwHGaLb23OHXIGBhlrymh85Q1lKUd0ga9S7GZ8mIC1S4FzqqnaAoTaVvWagqJ8w1dZoR/N4lP9QFu+Ye/0o4PMgg== 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; bh=N9dux4va4Pct9pRJc2NlHmBpV5vJzDFAc0HATou6u/I=; b=b0b5fVfcjfAdgL49kYJcFhQvpVvWWGGt4TdqEHItu5Jo1jIpZyGw2jlGPUN33JhHvizeaXDuQIBj32Y8/9uvlqMNKSpS/9JnV1Xa5Lzs8k3WRmiex+sDwAl0IyEwFTfYztuWVdn82wZQCIfB1wTbcTQETWRm+tFIVEZvfXHsJfmURj+XWIX8q0XZK5tza3zWfwRdLWEwgZ3xDpkJVISIeTBli03GL8d5c0W3qt44rQJ1fri90n2jqxUyJArboUx7Er2/BrYRTwelylTMqmleYMpSiwdbpkje4h0j3O9u0/bvF0ZR9qzbNYofITL6qrCm2MRNZ5mTYuKfK4sVZ/HL1Q== 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=N9dux4va4Pct9pRJc2NlHmBpV5vJzDFAc0HATou6u/I=; b=cPrV7HspXTUwvZMlr/44osVg95yOhivHkoZMP0WZM86ebBUCZfcZC1ukXhT7udGcmtbC39eD8G3GkKq5MkKidCSOQBxPFo7h9ez/fQgJjcWVLNCbzWDhyzYLkscE2l3Ojt50inW+i0YTpK0FbI6eT4ZBJ6PMy0Fd9stbeSNXCLZopi+NS8msXgSrkmX47b5eJIKQznbtBKUl+YEGllD4j5Btpr0OwQyQ8PGXy27moBUl+2xbm+IioyAij32TBUNi0GgAWMBSgmvrXYKulwcm7Fmnb4EQRCSJAz+v4lR5q84Fr6RLduG90YYOwffoIY6t28a0scUyfyMtqs1C+viaBw== Received: from PR3PR03MB6665.eurprd03.prod.outlook.com (2603:10a6:102:7d::6) by PA4PR03MB7246.eurprd03.prod.outlook.com (2603:10a6:102:bc::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.15; Thu, 30 Sep 2021 13:45:53 +0000 Received: from PR3PR03MB6665.eurprd03.prod.outlook.com ([fe80::15d4:ff2d:e607:cf68]) by PR3PR03MB6665.eurprd03.prod.outlook.com ([fe80::15d4:ff2d:e607:cf68%3]) with mapi id 15.20.4566.015; Thu, 30 Sep 2021 13:45:53 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 30 Sep 2021 15:39:48 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [z7qo/iPUogWbPDKB7muyI+I4BnJZEwnQ] X-ClientProxiedBy: AS9PR06CA0306.eurprd06.prod.outlook.com (2603:10a6:20b:45b::15) To PR3PR03MB6665.eurprd03.prod.outlook.com (2603:10a6:102:7d::6) X-Microsoft-Original-Message-ID: <20210930134239.2672698-46-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AS9PR06CA0306.eurprd06.prod.outlook.com (2603:10a6:20b:45b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.15 via Frontend Transport; Thu, 30 Sep 2021 13:45:52 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b3a18410-3c88-4338-0a24-08d984189efb X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNVNZLmtPNeeDNv1jHth/FTeRC8IpstjpwUsIckYo5RPS6R3vDa5Ho8FeLD0+iLtUyXd8MrvWxIARnUErijGVd9W3SqTqDBT+tggG8KnXiBgdxPPK629Ewtmqit7M22XLSJ9oSKcJ5Ct5JEyvQDyJIDL+F/z3GjYGeb3wvuDGsJHEItygEqcwvOmTz/KVPRkpkz3l+CyWwHfbN1u8Xklj3g0is8s4Kj7cvW3Ggv/I8lNboSgpbuk58iCoUwxxeUC7rf7ABcPeCKIxR44h7dSyqfDq3wo36AyVDoOeq0ADVGEP9RZaN8RxBqj9Bd74MeOMUYiPVz33yf9Oa5UuWc8uh0spaX6PfgO8DIOGumt9j5JEVgR4sYPX/XT7qab/j0vSaApLxsoDKk40h+KK6F7E2onmXj41RDsFlXFy+jFb/9odVBljR9+2hyUlmvwXawoc7jfe4O+4OH6nlkVehkVkBZmef+TbR+qg5PkCvFahQdcA87U3eNq8+97X8LZDqb2IBO8NiD3S9c5Q1XLrm4zPH+YKyxNywa54Jz0KJwDTIRSdR/XyFoOnZzXML9H8FqV6VVJflNUrtbMeLYtqLYfurL4zxThOOuZIxHVZJkC8DTosQp3j5p1TfUK7Z7W7qt0lIuPeIKmMONd+4uxHWUqojNNNrfc72qTWJL4hKJNLHC5f0l4zQp9Jjo6zU2ZS6h8cLI1a+wq78cY598k92+YxbT6vFDNyukuCMo= X-MS-TrafficTypeDiagnostic: PA4PR03MB7246: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RCCRN1uR1V26W0rUh8NspNN0Y8HrSXngwAFfBN3rfoSK3WnxwVqoDmLq2jUHhFgCJcMm2svGBFHtAj71naC1Pv31DoWuY2leycjKM2rxgxtr1xNoLBbvYFYkRzP/eWoDiSIEX1fYB0ku10KRNnaDBshm5XvT5/ZREOLU+ZHgy/4UuFqmOzGHTe8JXfuQoROB2Nn2lslBb97+ZnNOF+PxaNJgbEf13hNo4KyhoqcnE8U0YZiHPW9H9wOR/W6Gr/EpoATdXxZd4hsrElBGurHEv/cwqObhQvzTDwohdMc0E+QimnF3iLBUMxin8yJr9Y/VQdmxn/sD0gXJGJLNsVDBoyp3Gka4EdKD8EDnU2y83ezS7Km2fC6lAcHRmXO1l+grnuXqQDw4EGoBdw49G6+GqpxXFl6o8+TZrddRWkzkjW9IXOXpjP4Dj0/R2rDO2Rgx X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: x8NJjaVjiFl6ln0aE8WdpmjUyYvWAeLrlSsLId8qiFaXK5OPSE4FvvcLTSSkwl+N/mwVW1gjw7AhsOBeoeol27U5toTE46KZZ//3gSQqk98942KrcmQXG0K2khXnhzUotQ+Mg5BSUM4UXHGdQqGIdw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b3a18410-3c88-4338-0a24-08d984189efb X-MS-Exchange-CrossTenant-AuthSource: PR3PR03MB6665.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2021 13:45:53.3219 (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: PA4PR03MB7246 Subject: [FFmpeg-devel] [PATCH 047/218] avfilter/af_silenceremove: Use formats list instead of query function 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: gLES7L5vaRgq Signed-off-by: Andreas Rheinhardt --- libavfilter/af_silenceremove.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/libavfilter/af_silenceremove.c b/libavfilter/af_silenceremove.c index 1b420d7838..a02e1de783 100644 --- a/libavfilter/af_silenceremove.c +++ b/libavfilter/af_silenceremove.c @@ -923,24 +923,6 @@ static int request_frame(AVFilterLink *outlink) return ret; } -static int query_formats(AVFilterContext *ctx) -{ - static const enum AVSampleFormat sample_fmts[] = { - AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, - AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_DBLP, - AV_SAMPLE_FMT_NONE - }; - int ret = ff_set_common_all_channel_counts(ctx); - if (ret < 0) - return ret; - - ret = ff_set_common_formats_from_list(ctx, sample_fmts); - if (ret < 0) - return ret; - - return ff_set_common_all_samplerates(ctx); -} - static av_cold void uninit(AVFilterContext *ctx) { SilenceRemoveContext *s = ctx->priv; @@ -981,5 +963,6 @@ const AVFilter ff_af_silenceremove = { .uninit = uninit, FILTER_INPUTS(silenceremove_inputs), FILTER_OUTPUTS(silenceremove_outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, + AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_DBLP), };