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 236994432A for ; Tue, 8 Nov 2022 14:07:41 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 90F5568BBAB; Tue, 8 Nov 2022 16:07:38 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7F25368BA5B for ; Tue, 8 Nov 2022 16:07:32 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 01C28240499 for ; Tue, 8 Nov 2022 15:07:32 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id cnqLiHmrVSJs for ; Tue, 8 Nov 2022 15:07:31 +0100 (CET) Received: from lain.khirnov.net (lain.khirnov.net [IPv6:2001:67c:1138:4306::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "lain.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 6BA422400F5 for ; Tue, 8 Nov 2022 15:07:31 +0100 (CET) Received: by lain.khirnov.net (Postfix, from userid 1000) id 4DFF71601B2; Tue, 8 Nov 2022 15:07:31 +0100 (CET) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: References: <20221108112550.8375-1-anton@khirnov.net> <20221108112550.8375-3-anton@khirnov.net> Mail-Followup-To: FFmpeg development discussions and patches Date: Tue, 08 Nov 2022 15:07:31 +0100 Message-ID: <166791645128.20155.3271115273476016820@lain.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 3/5] lavf: replace FFERROR_REDO with AVERROR(EAGAIN) 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: Quoting Nicolas George (2022-11-08 13:54:53) > Anton Khirnov (12022-11-08): > > There is no meaningful distinction between them, both mean "the demuxer > > did some work, but did not produce a packet - should be called again". > > NAK, there a difference in semantics: AVEROR(EAGAIN) is for when data is > not available for external reasons, typically network blocking, This is false - there are zero demuxers returning EAGAIN due to network blocking. Furthermore, lavf architecture fundamentally does not allow generic non-blocking operations, so the most any demuxer can do is return at a few specific points. And since demuxers are supposed to be independent of the underlying IO protocol, they fundamentally cannot know anything about network state. So there really is no meaningful difference between REDO and EAGAIN. Both are just an opportunity for the caller to do something else before trying again. If we believe giving the caller this option is valuable, then it's valuable in both these cases and it makes no sense to distinguish between them. -- Anton Khirnov _______________________________________________ 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".