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

Reimar Döffinger Reimar.Doeffinger
Sun Nov 29 11:56:17 CET 2009


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.



More information about the ffmpeg-devel mailing list