Showing the changes to codec/decoder/core/src/parse_mb_syn_cavlc.cpp (1 of 2 files). Show all
Unified · Split
| @@ -718,8 +718,10 @@ int32_t WelsResidualBlockCavlc (SVlcTable* pVlcTable, uint8_t* pNonZeroCountCach · 717 unmodified lines | ||
| 718 | 718 | if ((uiTrailingOnes > 3) || (uiTotalCoeff > 16)) { /////////////////check uiTrailingOnes and uiTotalCoeff |
| 719 | 719 | return ERR_INFO_CAVLC_INVALID_TOTAL_COEFF_OR_TRAILING_ONES; |
| 720 | 720 | } |
| 721 | − iUsedBits += CavlcGetLevelVal (iLevel, &sReadBitsCache, uiTotalCoeff, uiTrailingOnes); | |
| 722 | − | |
| 721 | + if ((i = CavlcGetLevelVal (iLevel, &sReadBitsCache, uiTotalCoeff, uiTrailingOnes)) == -1) { | |
| 722 | + return ERR_INFO_CAVLC_INVALID_LEVEL; | |
| 723 | + } | |
| 724 | + iUsedBits += i; | |
| 723 | 725 | if (uiTotalCoeff < iMaxNumCoeff) { |
| 724 | 726 | iUsedBits += CavlcGetTotalZeros (iZerosLeft, &sReadBitsCache, uiTotalCoeff, pVlcTable, bChromaDc); |
| 725 | 727 | } else { |