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

michael subversion
Sat Aug 26 13:37:34 CEST 2006


Author: michael
Date: Sat Aug 26 13:37:33 2006
New Revision: 6096

Modified:
   trunk/libavcodec/bitstream.h

Log:
make A32 reader align its ptr during init no matter what missaligned mess is given to it


Modified: trunk/libavcodec/bitstream.h
==============================================================================
--- trunk/libavcodec/bitstream.h	(original)
+++ trunk/libavcodec/bitstream.h	Sat Aug 26 13:37:33 2006
@@ -719,20 +719,16 @@
     s->bit_count = 16;
     s->cache = 0;
   }
-#elif defined A32_BITSTREAM_READER
-    s->buffer_ptr = (uint32_t*)buffer;
-    s->bit_count = 32;
-    s->cache0 = 0;
-    s->cache1 = 0;
-#endif
     {
         OPEN_READER(re, s)
         UPDATE_CACHE(re, s)
         UPDATE_CACHE(re, s)
         CLOSE_READER(re, s)
     }
-#ifdef A32_BITSTREAM_READER
-    s->cache1 = 0;
+#elif defined A32_BITSTREAM_READER
+    s->buffer_ptr = (uint32_t*)((intptr_t)buffer&(~3));
+    s->bit_count = 32 + 8*((intptr_t)buffer&3);
+    skip_bits_long(s, 0);
 #endif
 }
 




More information about the ffmpeg-cvslog mailing list