aboutsummaryrefslogtreecommitdiffstats
path: root/libAACdec/src/rvlcbit.cpp
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2018-12-13 05:45:20 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-12-13 05:45:20 +0000
commitc75797cfaa5199247c53cf40dcc3329e6cdf3cce (patch)
tree35b2bf867a84f3a12f791c43de60e55c7e77bfb4 /libAACdec/src/rvlcbit.cpp
parentcdaf85d874abe9b772b2a3bbef7fadee9199bdc3 (diff)
parent20c336953febeabbf6deeb38f479ec7642b5a69b (diff)
downloadfdk-aac-c75797cfaa5199247c53cf40dcc3329e6cdf3cce.tar.gz
fdk-aac-c75797cfaa5199247c53cf40dcc3329e6cdf3cce.tar.bz2
fdk-aac-c75797cfaa5199247c53cf40dcc3329e6cdf3cce.zip
Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master"
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);