[Ffmpeg-devel] [PATCH] fix get_bits_long with ALT_BITSTREAM_READER_LE

Michael Niedermayer michaelni
Tue Sep 26 00:06:39 CEST 2006


Hi

On Mon, Sep 25, 2006 at 11:41:22PM +0200, Reimar D?ffinger wrote:
> Hello,
> get_bits_long (and thus tta.c) is currently completely broken for
> ALT_BITSTREAM_READER_LE, because it reassembles the two get_bits parts
> in a way that works only with big-endian.
> Before it was moved to bitstream.h it "worked" (more or less) because it
> used the big-endian get_bits and returned a big-endian thing.
> The attached patch should fix this properly and removes the
> get_bits_long_le hack from vorbis.c.
> Okay to apply?

[...]
>  // shamelessly copied from shorten.c
>  static int inline get_le16(GetBitContext *gb)
>  {
> -    return bswap_16(get_bits_long(gb, 16));
> +    return get_bits_long(gb, 16);
>  }

id suggest to replace get_le16 by get_bits(16)


>  
>  static int inline get_le32(GetBitContext *gb)
>  {
> -    return bswap_32(get_bits_long(gb, 32));
> +    return get_bits_long(gb, 32);
>  }

id suggest to replace get_le32 by get_bits_long(32)

except these iam fine with the patch

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

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list