changeset 4344:4aa24216f71a libavcodec

fix 16 CABAC_BIT * 10l bug introduced in r6578
author michael
date Sat, 13 Jan 2007 00:56:43 +0000
parents d9a61f401c11
children 88967250d718
files h264.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Wed Jan 10 14:23:28 2007 +0000
+++ b/h264.c	Sat Jan 13 00:56:43 2007 +0000
@@ -6224,7 +6224,10 @@
         // FIXME The two following lines get the bitstream position in the cabac
         // decode, I think it should be done by a function in cabac.h (or cabac.c).
         ptr= h->cabac.bytestream;
-        if (h->cabac.low&0x1) ptr-=CABAC_BITS/8;
+        if(h->cabac.low&0x1) ptr--;
+        if(CABAC_BITS==16){
+            if(h->cabac.low&0x1FF) ptr--;
+        }
 
         // The pixels are stored in the same order as levels in h->mb array.
         for(y=0; y<16; y++){