aboutsummaryrefslogtreecommitdiffstats
path: root/libAACdec/src/rvlcbit.cpp
diff options
context:
space:
mode:
authorBill Yi <byi@google.com>2018-11-28 18:34:17 -0800
committerBill Yi <byi@google.com>2018-11-28 18:34:17 -0800
commita342c8b68c8bd9d92a4c0f807cbc6230d8b45e5c (patch)
tree66fe1fc4eb2c283bcebf91e53f365c6b22f1b47c /libAACdec/src/rvlcbit.cpp
parentf76ceebf7a0ab901ac6586d764ae47576c17e08c (diff)
parentb97c2a93f288df43dd7cc0c45640509a17dddb18 (diff)
downloadfdk-aac-a342c8b68c8bd9d92a4c0f807cbc6230d8b45e5c.tar.gz
fdk-aac-a342c8b68c8bd9d92a4c0f807cbc6230d8b45e5c.tar.bz2
fdk-aac-a342c8b68c8bd9d92a4c0f807cbc6230d8b45e5c.zip
Merge pi-qpr1-release PQ1A.181105.017.A1 to pi-platform-release
Change-Id: If3ff263d4f628f2c6d4ad3c28d0571284ca1f56d
Diffstat (limited to 'libAACdec/src/rvlcbit.cpp')
-rw-r--r--libAACdec/src/rvlcbit.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libAACdec/src/rvlcbit.cpp b/libAACdec/src/rvlcbit.cpp
index c06cf96..b0c4596 100644
--- a/libAACdec/src/rvlcbit.cpp
+++ b/libAACdec/src/rvlcbit.cpp
@@ -123,10 +123,10 @@ read direction. It is called very often, therefore it makes sense to inline it
--------------------------------------------------------------------------------------------
*/
-UCHAR rvlcReadBitFromBitstream(HANDLE_FDK_BITSTREAM bs, INT *pPosition,
- UCHAR readDirection) {
+UCHAR rvlcReadBitFromBitstream(HANDLE_FDK_BITSTREAM bs, const INT bsAnchor,
+ INT *pPosition, UCHAR readDirection) {
UINT bit;
- INT readBitOffset = *pPosition - FDKgetBitCnt(bs);
+ INT readBitOffset = (INT)FDKgetValidBits(bs) - bsAnchor + *pPosition;
if (readBitOffset) {
FDKpushBiDirectional(bs, readBitOffset);