[FFmpeg-devel] skip_put_bits() bugged?

Stefano Sabatini stefano.sabatini-lala
Tue Mar 31 20:15:15 CEST 2009

On date Tuesday 2009-03-31 04:10:56 +0200, Michael Niedermayer encoded:
> On Tue, Mar 31, 2009 at 12:17:31AM +0200, Stefano Sabatini wrote:
> [...]
> > Which looks quite wrong.
> > Commenting in skip_put_bits(&pb, 0); it looks fine.
> > 
> > Am I missing something or is it indeed broken?
> bug in the documentation i would say unless you can fix it without
> speed loss

Bug is issued when bit_left is 32 or more (but I don't think bit_left
may assume a value grater than 32), I'd say is not a good idea to ask
the user to check for that value and then manually fiddle with

Also skip_put_bits() is currently called only in three points in

My previous fix adds a check, so it slows down it a little, but I
don't see other alternatives but to change the other functions (such
as put_bits() to make bit_left only take values less than 32.

FFmpeg = Faithless and Fast Moronic Pacific Extended Glue

More information about the ffmpeg-devel mailing list