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 1BDD6453F5 for ; Sat, 28 Jan 2023 13:23:58 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F084568BE20; Sat, 28 Jan 2023 15:23:54 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EF35568B757 for ; Sat, 28 Jan 2023 15:23:48 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 681C22404EC for ; Sat, 28 Jan 2023 14:23:48 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id wHYh6_k13sqQ for ; Sat, 28 Jan 2023 14:23:47 +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 B57DD240178 for ; Sat, 28 Jan 2023 14:23:47 +0100 (CET) Received: by lain.khirnov.net (Postfix, from userid 1000) id 9883B1601B2; Sat, 28 Jan 2023 14:23:47 +0100 (CET) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: References: <20230125165537.5371-1-anton@khirnov.net> Mail-Followup-To: FFmpeg development discussions and patches Date: Sat, 28 Jan 2023 14:23:47 +0100 Message-ID: <167491222759.4503.5349780751227464325@lain.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 01/19] lavc/avcodec: improve enc/dec API doxy 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 Marvin Scholz (2023-01-28 12:37:42) > > > On 25 Jan 2023, at 17:55, Anton Khirnov wrote: > > > Change return value descriptions into proper lists. > > --- > > libavcodec/avcodec.h | 81 +++++++++++++++++++++++--------------------- > > 1 file changed, 42 insertions(+), 39 deletions(-) > > > > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h > > index 0ac581d660..f3ca41f126 100644 > > --- a/libavcodec/avcodec.h > > +++ b/libavcodec/avcodec.h > > @@ -2605,17 +2605,18 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, > > * still has frames buffered, it will return them after sending > > * a flush packet. > > * > > - * @return 0 on success, otherwise negative error code: > > - * AVERROR(EAGAIN): input is not accepted in the current state - user > > - * must read output with avcodec_receive_frame() (once > > - * all output is read, the packet should be resent, and > > - * the call will not fail with EAGAIN). > > - * AVERROR_EOF: the decoder has been flushed, and no new packets can > > - * be sent to it (also returned if more than 1 flush > > - * packet is sent) > > - * AVERROR(EINVAL): codec not opened, it is an encoder, or requires flush > > - * AVERROR(ENOMEM): failed to add packet to internal queue, or similar > > - * other errors: legitimate decoding errors > > + * @return > > + * - 0: success > > + * - AVERROR(EAGAIN): input is not accepted in the current state - user must > > + * read output with avcodec_receive_frame() (once all > > + * output is read, the packet should be resent, and the > > + * call will not fail with EAGAIN). > > + * - AVERROR_EOF: the decoder has been flushed, and no new packets can be > > + * sent to it (also returned if more than 1 flush packet is > > + * sent) > > + * - AVERROR(EINVAL): codec not opened, it is an encoder, or requires flush > > + * - AVERROR(ENOMEM): failed to add packet to internal queue, or similar > > + * - other errors: legitimate decoding errors > > */ > > Wouldn't @retval work better for such return value documentation? I don't know, how is it better? -- 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".