[FFmpeg-devel] [PATCH] Clarify documentation for avcodec_encode_audio

Stefano Sabatini stefano.sabatini-lala
Wed Nov 28 11:13:51 CET 2007


On date Wednesday 2007-11-28 10:47:25 +0100, Michael Niedermayer encoded:
> On Wed, Nov 28, 2007 at 09:55:44AM +0100, Stefano Sabatini wrote:
> > > > > Index: libavcodec/avcodec.h
> > > > > ===================================================================
> > > > > --- libavcodec/avcodec.h	(revision 11059)
> > > > > +++ libavcodec/avcodec.h	(working copy)
> > > > > @@ -2672,9 +2672,11 @@
> > > > >   * @param avctx the codec context
> > > > >   * @param[out] buf the output buffer
> > > > >   * @param[in] buf_size the output buffer size
> > > > > - * @param[in] samples the input buffer containing the samples
> > > > > + * @param[in] samples the input buffer containing the samples. The
> > > > > + * number of samples read from this buffer is defined in
> > > > > + * avctx->frame_size.
> > > 
> > > the number of samples is frame_size*channels
> > > also the 'The' belongs in the next line to avoid unneccesariy chnaging one
> > > line
> > 
> > OK, but I'm also putting a "." at the end of the first line.
> > 
> > > > > - * @return On error a negative value is returned, on succes zero or the number
> > > > > - * of bytes used from the input buffer.
> > > > > + * @return On error a negative value is returned, on success zero or
> > > > > + * the number of bytes used to encode the data read from \p samples.
> > > > >   */
> > > 
> > > the original is clearer than your version
> > > a "is returned" could be added to the end
> > > "used" could be changed to "consumed"
> > > i dont think theres a special case for 0 (like undefined num bytes consumed)
> > > the typo fix belongs into a seperate patch
> > > and i dont see why "the number" is moved to the next line
> > 
> > No, the original is plain wrong, "consumed" is not the right term
> > since the returned value is the number of bytes used to *encode* the
> > data read, when the number of bytes read is frame_size*channels.
> 
> right, sorry, i dont know what ive been thinking, ive somehow mixed encode
> with decode ...
> 
> 
> > 
> > Anyway look if it seems more clear now, I'm also omitting to fix the
> > typo.
> 
> but not the '.' typo

Fixed.

Regards.
-- 
Stefano Sabatini
Linux user number 337176 (see http://counter.li.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clarify-encode-audio-doc-02.patch
Type: text/x-diff
Size: 781 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071128/08f4e6c3/attachment.patch>



More information about the ffmpeg-devel mailing list