From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id EE49E493E3 for ; Fri, 9 Feb 2024 16:53:43 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6D59768CCB5; Fri, 9 Feb 2024 18:53:40 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3318168CCB5 for ; Fri, 9 Feb 2024 18:53:34 +0200 (EET) Authentication-Results: mail0.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=Gh9Iu37S; dkim-atps=neutral Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id BE002240DA9; Fri, 9 Feb 2024 17:53:33 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id AhXx-Vmhp4TX; Fri, 9 Feb 2024 17:53:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1707497613; bh=o0P+XzHqRkr8278UDDcDdOEwbtgjLUuvSpfcV2xmbFs=; h=Subject:From:To:Cc:In-Reply-To:References:Date:From; b=Gh9Iu37SFNRTg1rG7w1VAZgbM14l82/W9EZSNffCWOKDS0HkokDId8aN3V8Xl6BA4 UP0rNiyI1roVpcyQvmFfZsgA0oatvthkmwVn3fMDxot8MJnfqgZO2sFi46EQINQRrE CoqChBKzShuYBKRCFV8vVkcMyRj7N52aJ6j50j1uSe/DQ7TKvtgbNl1KQMchflvZTy EOAe1RYyVaiAPFSFPqPQmg01+3xwKYcYr2IUTMJSsy+V5vY5aY8xhN684tvKPXKC1F z6AXMfieQniOQjU+npu+YlEb7qySWcPOruZNwyGxSYJm+vF9gyq1riLqiPA9NjZZqL iOTUvsr2l0kIQ== Received: from lain.khirnov.net (lain.khirnov.net [IPv6:2001:67c:1138:4306::3]) (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 "lain.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 35780240177; Fri, 9 Feb 2024 17:53:33 +0100 (CET) Received: by lain.khirnov.net (Postfix, from userid 1000) id 215191601B9; Fri, 9 Feb 2024 17:53:33 +0100 (CET) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: <20240209145349.104511-1-ffmpeg@haasn.xyz> References: <20240209145349.104511-1-ffmpeg@haasn.xyz> Mail-Followup-To: FFmpeg development discussions and patches , Niklas Haas Date: Fri, 09 Feb 2024 17:53:33 +0100 Message-ID: <170749761310.8914.3201350041139434095@lain.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 1/5] avfilter: tighten semantics on hw_device_ctx 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: Niklas Haas Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Quoting Niklas Haas (2024-02-09 15:53:45) > From: Niklas Haas > > Currently, such filters defer hardware device initialization to > query_formats(), which is not really the correct place to have it. It > would be far more logical for these filters to create the hardware > context at init time, and error out otherwise. > > By contrast, filters which merely receive or process hardware frames > typically do this at link config time, because they do not need access > to the hwframe specifics in order to query supported formats. > > The intention here is to specifically stop creating hardware devices in > query_formats. > --- > libavfilter/avfilter.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h > index 246d000251..b6adcf2473 100644 > --- a/libavfilter/avfilter.h > +++ b/libavfilter/avfilter.h > @@ -464,7 +464,8 @@ struct AVFilterContext { > * > * May be set by the caller on filters flagged with AVFILTER_FLAG_HWDEVICE > * before initializing the filter with avfilter_init_str() or > - * avfilter_init_dict(). > + * avfilter_init_dict(). *Must* be set for filters which do not have another > + * way of obtaining a hardware device context (e.g. from an input link). This now reads as if the user is required to set this field for any AVFILTER_FLAG_HWDEVICE filter, which is not true. IMO the text already requires callers to set it before init, so there's no need to change anything. -- Anton Khirnov _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".