aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2006-09-25 22:47:55 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2006-09-25 22:47:55 +0000
commitd1121caa664a8c750a8b0ad96e7e734988f4b27c (patch)
tree73c9f9c2192bcb8a7722c6a25ae39c52f9cfbb27 /libavcodec
parent4fde50604dfa67ea001608cb409c487a65cd5ce5 (diff)
downloadffmpeg-d1121caa664a8c750a8b0ad96e7e734988f4b27c.tar.gz
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
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/bitstream.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/bitstream.h b/libavcodec/bitstream.h
index 9d82e8b416..bbb7fcda09 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
}
}