Mercurial > libavcodec.hg
changeset 3760:dbe7b99efdbf libavcodec
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.
author | reimar |
---|---|
date | Mon, 25 Sep 2006 22:47:55 +0000 |
parents | 64642d08db1b |
children | c559d45f66e8 |
files | bitstream.h |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 } }