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 C568647660 for ; Mon, 15 Jul 2024 23:01:33 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 864EF68D900; Tue, 16 Jul 2024 02:01:30 +0300 (EEST) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8E69168D8A6 for ; Tue, 16 Jul 2024 02:01:23 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 198FAEAB53 for ; Tue, 16 Jul 2024 01:01:23 +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 p8hk-wLRtdcD for ; Tue, 16 Jul 2024 01:01:20 +0200 (CEST) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id 1A340EAAA5 for ; Tue, 16 Jul 2024 01:01:20 +0200 (CEST) Date: Tue, 16 Jul 2024 01:01:20 +0200 (CEST) From: Marton Balint To: FFmpeg development discussions and patches In-Reply-To: Message-ID: <9e16396a-4ef2-fdb3-fce8-94e19a141473@passwd.hu> References: <20240715151319.2322241-1-ffmpeg-devel@pileofstuff.org> <14f41f0c-d2b0-3bd4-06ef-bfbac84274a9@passwd.hu> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH] avutil/error: Provide better feedback about unknown error codes 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Mon, 15 Jul 2024, Andrew Sayers wrote: > On Mon, Jul 15, 2024 at 05:45:24PM +0200, Marton Balint wrote: >> >> >> On Mon, 15 Jul 2024, Andrew Sayers wrote: >> >>> AVERROR messages should always be less than zero, >>> and are usually based on three or four ASCII characters. >>> >>> For error codes that aren't explicitly handled by error.c (e.g. FFERROR_REDO), >>> print the ASCII code so the user has a little more information. >> >> All ffmpeg internal error codes (including the ones having some special tag >> representation) should be handled by error.c. The user should never receive >> FFERROR_REDO, that is an internal error code, it should never reach the >> user. Therefore I see no benefit in disclosing the error bytes, because that >> is not the proper fix. >> >> Regards, >> Marton > > So it sounds like this patch is addressing two separate issues: > > 1. any messages caught by the test in the patch represent a bug in FFmpeg > * how about I modify this patch to ask the user to report the bug? > * would the ASCII error code help with triage? I don't really like adding extra code for this, and from an API point of view any negative error code can be valid, so you can't really warn about them. If you want to make sure that every ffmpeg error code has a text, then add a fate test for checking it. > 2. FFERROR_REDO should be added to error.c > * let me know if I should submit a separate patch for this FFERROR_REDO is an avformat internal error code, av_strerror() being in avutil cannot properly support it. Regards, Marton _______________________________________________ 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".