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 EFC25493D4 for ; Fri, 9 Feb 2024 14:54:14 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E60D868D0ED; Fri, 9 Feb 2024 16:54:02 +0200 (EET) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 15E8868CD10 for ; Fri, 9 Feb 2024 16:53:55 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1707490434; bh=oWo/MFovr5dom++3eGO7WcyJlMl2DL2Xmd16ULRTP7E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JHcgKYHQMa99rJWP3SAWaFexnvKZrfJ+Ar3ZLFGfxhSTGPv3nXs+Adbde1kYF5Dq4 ABLRuOiK7suGaeGy95yXT5vmc+BUDGeZ+GxA6St6yUayveaBLme6KVRty2EwbXTZym 93J++ckwzkxmDTh0HbqH9k7QUcngU9geCuqkA0Oo= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id C619341818; Fri, 9 Feb 2024 15:53:54 +0100 (CET) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Fri, 9 Feb 2024 15:53:46 +0100 Message-ID: <20240209145349.104511-2-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240209145349.104511-1-ffmpeg@haasn.xyz> References: <20240209145349.104511-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/5] fftools/ffmpeg_filter: provide hwctx when probing graph 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 Otherwise, filters that depend on a hw_device_ctx being present at init() time would fail configuring under the semantics outlined in the previous commit. --- fftools/ffmpeg_filter.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 38ddd1963a..46e1d790e7 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -931,6 +931,7 @@ int fg_create(FilterGraph **pfg, char *graph_desc, Scheduler *sch) AVFilterInOut *inputs, *outputs; AVFilterGraph *graph; + AVBufferRef *hw_device; int ret = 0; fgp = allocate_array_elem(&filtergraphs, sizeof(*fgp), &nb_filtergraphs); @@ -961,7 +962,9 @@ int fg_create(FilterGraph **pfg, char *graph_desc, Scheduler *sch) return AVERROR(ENOMEM);; graph->nb_threads = 1; - ret = graph_parse(graph, fgp->graph_desc, &inputs, &outputs, NULL); + hw_device = hw_device_for_filter(); + + ret = graph_parse(graph, fgp->graph_desc, &inputs, &outputs, hw_device); if (ret < 0) goto fail; -- 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".