aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-01-13 00:56:43 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-01-13 00:56:43 +0000
commit6de062957b4e4f40c52bb2b5a57ecd2f3681fb2e (patch)
treeb4b7e84000a667f3329e45560d086b88433e8115 /libavcodec/h264.c
parentd28ef27031367a91ba89ebf9aa4e2610932ca745 (diff)
downloadffmpeg-6de062957b4e4f40c52bb2b5a57ecd2f3681fb2e.tar.gz
fix 16 CABAC_BIT * 10l bug introduced in r6578
Originally committed as revision 7440 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index d7c48bd4a3..451a2af5bc 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -6224,7 +6224,10 @@ decode_intra_mb:
// 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++){