[Ffmpeg-cvslog] r6332 - trunk/libavcodec/bitstream.h

reimar subversion
Tue Sep 26 00:47:55 CEST 2006


Author: reimar
Date: Tue Sep 26 00:47:55 2006
New Revision: 6332

Modified:
   trunk/libavcodec/bitstream.h

Log:
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.


Modified: trunk/libavcodec/bitstream.h
==============================================================================
--- trunk/libavcodec/bitstream.h	(original)
+++ trunk/libavcodec/bitstream.h	Tue Sep 26 00:47:55 2006
@@ -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
     }
 }
 




More information about the ffmpeg-cvslog mailing list