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

Michael Niedermayer michaelni
Wed Nov 28 12:27:23 CET 2007


On Wed, Nov 28, 2007 at 11:13:51AM +0100, Stefano Sabatini wrote:
> 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.

looks ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071128/d3d08f82/attachment.pgp>



More information about the ffmpeg-devel mailing list