From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id AD9AC4FA27 for ; Tue, 24 Jun 2025 19:24:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id B83F968D322; Tue, 24 Jun 2025 22:23:48 +0300 (EEST) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id BDABD68D287 for ; Tue, 24 Jun 2025 22:23:41 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 710F6E9E73; Tue, 24 Jun 2025 21:20:54 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ivYaNOSwM3sO; Tue, 24 Jun 2025 21:20:53 +0200 (CEST) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 2A0AAE9FA2; Tue, 24 Jun 2025 21:20:53 +0200 (CEST) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Tue, 24 Jun 2025 21:23:04 +0200 Message-ID: <20250624192318.7430-6-cus@passwd.hu> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250624192318.7430-1-cus@passwd.hu> References: <20250624192318.7430-1-cus@passwd.hu> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 06/12] avfilter/avfilter: make filter_activate_default request frames on behalf of sinks 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: Marton Balint 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: Sinks without an activate callback have no means to request frames in their input, therefore the default activate callback should do it for them. Fixes ticket #11624. Fixes ticket #10988. Fixes ticket #10990. Signed-off-by: Marton Balint --- libavfilter/avfilter.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index e03dc65fc6..5bcf0b4ef7 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -1288,6 +1288,10 @@ static int filter_activate_default(AVFilterContext *filter) if (li->frame_wanted_out) return request_frame_to_filter(filter->outputs[i]); } + if (!filter->nb_outputs) { + ff_inlink_request_frame(filter->inputs[0]); + return 0; + } return FFERROR_NOT_READY; } @@ -1427,6 +1431,11 @@ static int filter_activate_default(AVFilterContext *filter) Rationale: even if all inputs are blocked an activate callback should request a frame on some if its inputs if a frame is requested on any of its output. + + - Request a frame on the input for sinks. + + Rationale: sinks using the old api have no way to request a frame on their + input, so we need to do it for them. */ int ff_filter_activate(AVFilterContext *filter) -- 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".