From patchwork Thu Aug 29 08:50:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 51223 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:402a:b0:48e:c0f8:d0de with SMTP id ky42csp211317vqb; Thu, 29 Aug 2024 02:00:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWvL98mqNaxXUqYVBEWBJXW3K7e9yftPcM0+vVhzzmbLFjuuOInDxQdcQo6UL6sner3QLf5GTx2NL0re8Nk9SaE@gmail.com X-Google-Smtp-Source: AGHT+IF4yMTNGEa/D8jsSXcYLrYRLRpnFGG011qh/z5wJUmhl48x392Qt+ZydnoRV7pmekCTXOos X-Received: by 2002:a2e:be2b:0:b0:2ef:17df:62f9 with SMTP id 38308e7fff4ca-2f610581e14mr9097251fa.7.1724922017117; Thu, 29 Aug 2024 02:00:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724922017; cv=none; d=google.com; s=arc-20240605; b=NJH8Ukoh79z09Pd1rXIgGfvgkfi2YKuRhPyiOnYYoznFVDiJb06x924I4Az+QLroQ3 dcA3EC9U3z4pdbjxNvar23Wr24d6Uu7N2Fu39zavYkEAcxe2kKGVV0jnMf96AFRzhVGA skyDhSA5U3Fr6re4SX+o8O86/oKwXbn8SmRZxdyH1vS6OqcWmJ1vjmNfSAT9q4ZkrxoF ZXaqWm1R5661ukLNQ2SJRsw9To9wtnpAelyoFDeXeDbJXAJTQwQD9jk/35qestWzxyZW nQ1udscqRsVP4ZaWhH4a8F7y4HIHuGZHKlFrXJd4+BcJm+h9bE/i53JEBvM5AHcLXwBD TyLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=Rev5AdDQvdivANP1tHEQh2UFD6lsvT3VMKDX1u9r620=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=Dj6Ns8AWiWxByqqHEzyCjGPrFJlntVPczs7fOo4Rxy/3R/Oef/074wUi1GZ8k/jb7B DjC+knDIzN9WsnzBzONrfJex+UU2g0uVaNm59IxwlDnYd0juokUDj864G4GWtCyWE5rH Ci9TtoPeu/3m0RyAnbSwwiMB724ORVq0+ZFQP9mlMrr/KM/sIDAirt6oHkPvrulG3WtI 1KdRdnhB7JZVPfN2L0kqkGVVDuv0pk+i72M8NBpRWFtZidCmXGjffGzEShQ6uHtEhycI mNqKKiZAeFfMVvO8q7VTRKf23X77dZK+CLwQwDNb6ZfTnJSFqhqBId7X7w7XjAvt47UF Sitw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@khirnov.net header.s=mail header.b=BVDN7j9R; 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 38308e7fff4ca-2f614e957eesi3027611fa.17.2024.08.29.02.00.16; Thu, 29 Aug 2024 02:00:17 -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=@khirnov.net header.s=mail header.b=BVDN7j9R; 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 E6EBB68DD3A; Thu, 29 Aug 2024 11:52:09 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B87C068DCE7 for ; Thu, 29 Aug 2024 11:52:01 +0300 (EEST) Authentication-Results: mail1.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=BVDN7j9R; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 75EBE4DF6 for ; Thu, 29 Aug 2024 10:51:57 +0200 (CEST) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id ojVqjwMv5j5X for ; Thu, 29 Aug 2024 10:51:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1724921514; bh=PcnxlII5mBj4W2+ihyz3A7rOFKmtcghsr28rAWscqRQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BVDN7j9RUP1ah23maICQwVkAWjvZuErdxQgl4FiuBec1MxzO+WmQLd2v5n6UPzPXm ciLIMXFr7J5Lou3NoDzvSL0KbensUWg4qYoEseq4WdCVK3Mb5TsavJys9t5HCjZ243 VoWT1DEGzoavzurbXrObOKT52wSLCekU3m/QKyp1Ih2NbWgRT0F0Y+ln50j6fU1K+E UYPjxbt6ispGr7a1XlASYzk9tf1bJxIxLPrOTCU0P5ZCuE94PVWuLS2OeEjuKamy47 WQuBRt+c5pGY0LJtUZWgsZStJxtYU3rVvqUcKBLzF4Td5AiMLUmokB7L776DsI5KN4 s8IbQ3pKZ/eNA== Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail1.khirnov.net (Postfix) with ESMTPS id 9C1DE4E04 for ; Thu, 29 Aug 2024 10:51:54 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 6FE913A299F for ; Thu, 29 Aug 2024 10:51:48 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Thu, 29 Aug 2024 10:50:52 +0200 Message-ID: <20240829085052.533-8-anton@khirnov.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240829085052.533-1-anton@khirnov.net> References: <20240829085052.533-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 8/8] lavfi/af_aformat: convert to query_func2() 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 5PF6dyTrASWh --- libavfilter/af_aformat.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/libavfilter/af_aformat.c b/libavfilter/af_aformat.c index dcedff7b70..a7d05a9ce8 100644 --- a/libavfilter/af_aformat.c +++ b/libavfilter/af_aformat.c @@ -104,25 +104,27 @@ static av_cold int init(AVFilterContext *ctx) return 0; } -static int query_formats(AVFilterContext *ctx) +static int query_formats(const AVFilterContext *ctx, + AVFilterFormatsConfig **cfg_in, + AVFilterFormatsConfig **cfg_out) { - AFormatContext *s = ctx->priv; + const AFormatContext *s = ctx->priv; int ret; if (s->nb_formats) { - ret = ff_set_common_formats_from_list(ctx, s->formats); + ret = ff_set_common_formats_from_list2(ctx, cfg_in, cfg_out, s->formats); if (ret < 0) return ret; } if (s->nb_sample_rates) { - ret = ff_set_common_samplerates_from_list(ctx, s->sample_rates); + ret = ff_set_common_samplerates_from_list2(ctx, cfg_in, cfg_out, s->sample_rates); if (ret < 0) return ret; } if (s->nb_channel_layouts) { - ret = ff_set_common_channel_layouts_from_list(ctx, s->channel_layouts); + ret = ff_set_common_channel_layouts_from_list2(ctx, cfg_in, cfg_out, s->channel_layouts); if (ret < 0) return ret; } @@ -139,5 +141,5 @@ const AVFilter ff_af_aformat = { .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(ff_audio_default_filterpad), FILTER_OUTPUTS(ff_audio_default_filterpad), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), };