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 3E01548F85 for ; Fri, 1 Mar 2024 14:12:04 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B65DB68D272; Fri, 1 Mar 2024 16:12:01 +0200 (EET) Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [80.241.56.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AA50268D1DA for ; Fri, 1 Mar 2024 16:11:54 +0200 (EET) Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4TmVQJ0Bh1z9t8C for ; Fri, 1 Mar 2024 15:11:52 +0100 (CET) From: Gyan Doshi To: ffmpeg-devel@ffmpeg.org Date: Fri, 1 Mar 2024 19:41:07 +0530 Message-ID: <20240301141135.23870-1-ffmpeg@gyani.pro> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4TmVQJ0Bh1z9t8C Subject: [FFmpeg-devel] [PATCH] avfilter: update filter timeline state only on main link 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 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: At present, consume_update evaluates timeline state on all links for a multi-input filter. This can lead to the filter being incorrectly en/dis-abled when evaluation on a frame on a secondary link leads to a different result than the frame on the current main link next in line for processing. --- libavfilter/avfilter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index daa7c3672a..d7ea993508 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -1430,7 +1430,8 @@ static void consume_update(FilterLinkInternal *li, const AVFrame *frame) AVFilterLink *const link = &li->l; update_link_current_pts(li, frame->pts); ff_inlink_process_commands(link, frame); - link->dst->is_disabled = !ff_inlink_evaluate_timeline_at_frame(link, frame); + if (link == link->dst->inputs[0]) + link->dst->is_disabled = !ff_inlink_evaluate_timeline_at_frame(link, frame); link->frame_count_out++; link->sample_count_out += frame->nb_samples; } -- 2.44.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".