[FFmpeg-devel] remove int readers

Ronald S. Bultje rsbultje
Thu Jun 14 14:18:17 CEST 2007


Hi,

On 6/14/07, Reimar Doeffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>
wrote:
>
> > -        version = get_bits(&gb, 8) << 16;
> > -        version |= get_bits(&gb, 8) << 8;
> > -        version |= get_bits(&gb, 8);
> > -
> > +        version = get_bits(&gb, 24);
>
> I think you must use get_bits_long to read 24 bits. And I assume you
> checked that this actually gives the same result? (depends on bitstream
> reader used).


I think it's used with values up to 32 in various places, even in
oggparsetheora.c itself. Also, since the return value is an unsigned int
(32bits), it should be ok.

Ronald




More information about the ffmpeg-devel mailing list