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 63E83493DA for ; Fri, 9 Feb 2024 14:54:04 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C59CC68D010; Fri, 9 Feb 2024 16:54:01 +0200 (EET) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E641D68A9C8 for ; Fri, 9 Feb 2024 16:53:54 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1707490434; bh=NdS9t9QE5Md6r1AyPCc/QIqDa3UEuyz1nQs3kwjy5AM=; h=From:To:Cc:Subject:Date:From; b=ggxcg7VVZuWlUichD5PPj3p175VU3CEcDc/SL4eAzdk+gmnClEg6PLKfzwfL/DFlB if3jfJQhprrsdaG+qhEsH4S9FzbWoBsMChQ9VvW+fSA2qRnFjSV+3jDjM2MtlQ/U6w 6B3HzK1uZ1Fqkn3k5u7MyHfxwgrYryBQzH+3mbwA= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 938ED40A49; Fri, 9 Feb 2024 15:53:54 +0100 (CET) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Fri, 9 Feb 2024 15:53:45 +0100 Message-ID: <20240209145349.104511-1-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Subject: [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: 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). */ AVBufferRef *hw_device_ctx; -- 2.43.0 _______________________________________________ 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".