[FFmpeg-devel] [PATCH] Improve documentation for flush_put_bits()

Stefano Sabatini stefano.sabatini-lala
Sun Nov 29 12:39:58 CET 2009


On date Sunday 2009-11-29 11:56:17 +0100, Reimar D?ffinger encoded:
> On Sun, Nov 29, 2009 at 11:36:56AM +0100, Stefano Sabatini wrote:
> > Index: ffmpeg/libavcodec/put_bits.h
> > ===================================================================
> > --- ffmpeg.orig/libavcodec/put_bits.h	2009-11-28 12:00:46.000000000 +0100
> > +++ ffmpeg/libavcodec/put_bits.h	2009-11-29 11:33:28.000000000 +0100
> > @@ -91,7 +91,8 @@
> >  }
> >  
> >  /**
> > - * Pads the end of the output stream with zeros.
> > + * Pads the bitstream with zeros up to the next byte boundary, and
> > + * writes any buffered output to the bitstream.
> 
> Maybe better something like:
> Writes buffered output if any and pads with zeros up to the
> next boundary if necessary (like align_put_bits does).
> 
> I think the order of your suggestion is a bit confusing, the main
> purpose is to flush, i.e. write buffered data, the padding is just
> an unavoidable necessity.

If I'm not mistaken align_put_bits() doesn't necessarily flushes data,
so padding is done before the flushing, so your description may be
confusing as well.

What about:
Writes buffered output if any to the bitstream. The flushed data is
padded with zeros up to the next byte boundary.

Regards.
-- 
FFmpeg = Funny and Fiendish Mind-dumbing Perennial Energized God



More information about the ffmpeg-devel mailing list