ref: f1d92ef36306f1e302b986f0d078211e0f968690
parent: af6a9a838fa18a827ea5684b72374ccf9f0e6ddb
author: Haibo Zhu <haibozhu@cisco.com>
date: Thu Oct 15 21:13:23 EDT 2015
Remove the shift exponent too large warning
--- a/codec/decoder/core/inc/error_code.h
+++ b/codec/decoder/core/inc/error_code.h
@@ -195,6 +195,7 @@
ERR_INFO_INVALID_MMCO_LONG_TERM_IDX_EXCEED_MAX,
//for CABAC
ERR_CABAC_NO_BS_TO_READ,
+ERR_CABAC_UNEXPECTED_VALUE,
//for scaling list
ERR_SCALING_LIST_DELTA_SCALE,
};
--- a/codec/decoder/core/src/cabac_decoder.cpp
+++ b/codec/decoder/core/src/cabac_decoder.cpp
@@ -273,7 +273,10 @@
iSymTmp += (1 << iCount);
++iCount;
}
- } while (uiCode != 0);
+ } while (uiCode != 0 && iCount != 31);
+ if (iCount == 31) {
+ return ERR_CABAC_UNEXPECTED_VALUE;
+ }
while (iCount--) {
WELS_READ_VERIFY (DecodeBypassCabac (pDecEngine, uiCode));