ref: fed9213dfa572b0dd22bb475aca2c362ebc98d9c
parent: c2b000431f56ed1b2d3d6743218bf037ca5e330e
author: xiaotiansf <[email protected]>
date: Mon Jan 7 12:04:33 EST 2019
Fix Ref Picture count check for CAVLC B motion prediction.
--- a/codec/decoder/core/src/parse_mb_syn_cavlc.cpp
+++ b/codec/decoder/core/src/parse_mb_syn_cavlc.cpp
@@ -1627,7 +1627,7 @@
if (iMotionPredFlag[listIdx][i] == 0) {
WELS_READ_VERIFY (BsGetTe0 (pBs, iRefCount[listIdx], &uiCode)); //ref_idx_l0[ mbPartIdx ]
iref = uiCode;
- if ((iref < 0) || (iref >= iRefCount[0]) || (ppRefPic[listIdx][iref] == NULL)) { //error ref_idx
+ if ((iref < 0) || (iref >= iRefCount[listIdx]) || (ppRefPic[listIdx][iref] == NULL)) { //error ref_idx
pCtx->bMbRefConcealed = true;
if (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE) {
iref = 0;