From patchwork Fri Oct 4 08:42:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 52031 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:938f:0:b0:48e:c0f8:d0de with SMTP id z15csp268962vqg; Fri, 4 Oct 2024 02:09:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUD7OXRTDIoLvcuQ2CqgV7PxAiDwdG/49064YpyEnR2sdAWWXpKB9x5K+WK5ODipu5+MmkJa5w/dFetgN/UkXiM@gmail.com X-Google-Smtp-Source: AGHT+IHxfGd2QhLwRCA1HFAU2Pj1HHAApd5jJrszVhovbq0vR+dtmuTYhEq0mej1lgqOAGoXhF38 X-Received: by 2002:a17:907:1c1b:b0:a7a:9f0f:ab18 with SMTP id a640c23a62f3a-a991bd4906bmr189575966b.20.1728032959006; Fri, 04 Oct 2024 02:09:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728032958; cv=none; d=google.com; s=arc-20240605; b=Y8OPDIJnESzMrnDbfKuu8AONtvfCtr8JHP9Vn3Cs6Rvv6lKIGO3yYUqFWxymjUKhWm 9F2bU7PJsWTAdmVrTrdOi5tc0yNVi3fEdOnFUrH5Q/MNztlf2pVMC8+s5tdZtYLxswl3 la0E4Cn6AZPwcXp3TFUqXVPf7K4J2R+ovKq1UNiM32tMUyk5eRLqgE8OTzJ/5XpePi22 0x0ntQ8egJ1GKrmleIy3DPp2uFAjaUTOK7M9OdDqwgy4IpmRA3wsnXzhULk1lVoAtrd5 38JVVvuZVPVRMGQXADz1lTPUO9ggj5nNKYZBqMXLMhu0CVygWFkWnX80F6+OYTRUtjdR FewQ== 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=l0Ttna15aySpguDdtTtCosHod+Tq54M9R8UPnKr35zo=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=ZVQvsZ3utZ34FKdSzeL3Akh5wHEMC5UtWqCPErt0VLTYsVDFQU/HuiD4vBROWlftmq tH9OR7POupp1T80KcXLWiPTBdcXQxGlMMFy2KGAGhWq6A98/nDWXxDWXW/COccAk/9kN vg6KINiXsWYmBTmo3RAh+EFpugF24pQEExpLPAr5w16YDveNMCk8F1ozKm3kQMeRMfVe Ssg47+6UuSpNBb+N9C9Wbh/SgLHFegrJlvKxxsHQIOMPxGtLKWc6cYU1ihFNuB7DmiCW Z/hWqI/c8Ka12/AbyiJDb552McO3Wc88UWy2CNg8Wxi6FMUKwDL+k+ejwvFQtL50Mgxx 7sfg==; 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=mjr6ktmJ; 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 a640c23a62f3a-a9911104bbcsi188063266b.1015.2024.10.04.02.09.18; Fri, 04 Oct 2024 02:09:18 -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=mjr6ktmJ; 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 D8DEF68DBB5; Fri, 4 Oct 2024 11:43:17 +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 7163C68DA75 for ; Fri, 4 Oct 2024 11:42:57 +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=mjr6ktmJ; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 88D1D4E2D for ; Fri, 4 Oct 2024 10:42:53 +0200 (CEST) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id ltJFhGMIlVEy for ; Fri, 4 Oct 2024 10:42:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1728031370; bh=uTT1MmmZ32m87x7cU6fvQom8ko/YIMmqcAXefgboBRE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mjr6ktmJZGQIhMMKGwPwVdtqzkd1SDtLs3OUxE/eGHqhqMgxB8ZwgJuGHDwjT/W2W dsF/G4NGPfi7VQyFO3gsCybVbnm6wR1HXUCbOmBNbDWXlivvLaItTze0RLL6BnXJsF UsPqx7461dSi5NfSDlz4Ca2aGteAHQxWQbA0/g1bNr/ZEksK8oHAaz8qHVR/SRYitx b4UmyvBz8NwQGq0JLMYIrwgt06HquTxFu+wLcSBFmONYpQ0MSHbcAoRcfhmuw/55+0 F1Qzou2Lj9smWFOyzz6QytVfDgi6HWubYZo3L0L8gQ6Uy1McmQBZDePltRmLzkm567 +vbNhEv9XzKOQ== 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 6099D4E31 for ; Fri, 4 Oct 2024 10:42:50 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 524033A0F02 for ; Fri, 04 Oct 2024 10:42:50 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 4 Oct 2024 10:42:29 +0200 Message-ID: <20241004084230.27419-19-anton@khirnov.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241004084230.27419-1-anton@khirnov.net> References: <20241004084230.27419-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 19/20] lavfi/vf_hwmap: switch 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: 0egWXivYr3tv --- libavfilter/vf_hwmap.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_hwmap.c b/libavfilter/vf_hwmap.c index e999605eb1..f32a566b74 100644 --- a/libavfilter/vf_hwmap.c +++ b/libavfilter/vf_hwmap.c @@ -37,14 +37,16 @@ typedef struct HWMapContext { int reverse; } HWMapContext; -static int hwmap_query_formats(AVFilterContext *avctx) +static int hwmap_query_formats(const AVFilterContext *avctx, + AVFilterFormatsConfig **cfg_in, + AVFilterFormatsConfig **cfg_out) { int ret; if ((ret = ff_formats_ref(ff_all_formats(AVMEDIA_TYPE_VIDEO), - &avctx->inputs[0]->outcfg.formats)) < 0 || + &cfg_in[0]->formats)) < 0 || (ret = ff_formats_ref(ff_all_formats(AVMEDIA_TYPE_VIDEO), - &avctx->outputs[0]->incfg.formats)) < 0) + &cfg_out[0]->formats)) < 0) return ret; return 0; @@ -428,7 +430,7 @@ const AVFilter ff_vf_hwmap = { .priv_class = &hwmap_class, FILTER_INPUTS(hwmap_inputs), FILTER_OUTPUTS(hwmap_outputs), - FILTER_QUERY_FUNC(hwmap_query_formats), + FILTER_QUERY_FUNC2(hwmap_query_formats), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, .flags = AVFILTER_FLAG_HWDEVICE, };