Fix Ref Picture count check for CAVLC B motion prediction.

This commit is contained in:
xiaotiansf
2019-01-07 17:04:33 -08:00
parent 5c7140961d
commit 1b4e62d74d
@@ -1627,7 +1627,7 @@ int32_t ParseInterBInfo (PWelsDecoderContext pCtx, int16_t iMvArray[LIST_A][30][
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;