# HG changeset patch # User reimar # Date 1159224475 0 # Node ID dbe7b99efdbfa96c2973c762ad892d72ac7d9a63 # Parent 64642d08db1b913a29b164a8e66a2662ddf909d7 Fix get_bits_long to work with ALT_BITSTREAM_READER_LE. Gives the same result as get_bits_long_le in vorbis.c instead of some wild big-/little-endian mixture. diff -r 64642d08db1b -r dbe7b99efdbf bitstream.h --- a/bitstream.h Mon Sep 25 18:54:18 2006 +0000 +++ b/bitstream.h Mon Sep 25 22:47:55 2006 +0000 @@ -725,8 +725,13 @@ static inline unsigned int get_bits_long(GetBitContext *s, int n){ if(n<=17) return get_bits(s, n); else{ +#ifdef ALT_BITSTREAM_READER_LE + int ret= get_bits(s, 16); + return ret | (get_bits(s, n-16) << 16); +#else int ret= get_bits(s, 16) << (n-16); return ret | get_bits(s, n-16); +#endif } }