From d1121caa664a8c750a8b0ad96e7e734988f4b27c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Reimar=20D=C3=B6ffinger?= Date: Mon, 25 Sep 2006 22:47:55 +0000 Subject: [PATCH] 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. Originally committed as revision 6332 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/bitstream.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/bitstream.h b/libavcodec/bitstream.h index 9d82e8b41..bbb7fcda0 100644 --- a/libavcodec/bitstream.h +++ b/libavcodec/bitstream.h @@ -725,8 +725,13 @@ static inline void skip_bits1(GetBitContext *s){ 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 } } -- 2.11.0