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 B7DEF4FA13 for ; Tue, 24 Jun 2025 19:23:48 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 3DE2E68D271; Tue, 24 Jun 2025 22:23:37 +0300 (EEST) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 1603968D1ED for ; Tue, 24 Jun 2025 22:23:31 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id C8A16E9EF1; Tue, 24 Jun 2025 21:20:43 +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 zUBUPPschDYd; Tue, 24 Jun 2025 21:20:42 +0200 (CEST) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 0C952E9E73; Tue, 24 Jun 2025 21:20:42 +0200 (CEST) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Tue, 24 Jun 2025 21:23:00 +0200 Message-ID: <20250624192318.7430-2-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 02/12] avfilter/filters: simplify FF_FILTER_FORWARD_WANTED_ANY 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: The status check is unneeded because an outlink with a nonzero status should always return 0 for ff_outlink_frame_wanted(). Also use unsigned for index because nb_outputs is unsigned as well. Signed-off-by: Marton Balint --- libavfilter/filters.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavfilter/filters.h b/libavfilter/filters.h index 66dc611a98..e3013eda65 100644 --- a/libavfilter/filters.h +++ b/libavfilter/filters.h @@ -701,9 +701,7 @@ static inline void ff_outlink_set_status(AVFilterLink *link, int status, int64_t * If the flag is set on any of the outputs, this macro will return immediately. */ #define FF_FILTER_FORWARD_WANTED_ANY(filter, inlink) do { \ - for (int i = 0; i < filter->nb_outputs; i++) { \ - if (ff_outlink_get_status(filter->outputs[i])) \ - continue; \ + for (unsigned i = 0; i < filter->nb_outputs; i++) { \ if (ff_outlink_frame_wanted(filter->outputs[i])) { \ ff_inlink_request_frame(inlink); \ return 0; \ -- 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".