Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 1 file). Show all
Unified · Split
| @@ -2652,7 +2652,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 2651 unmodified lines | ||
| 2652 | 2652 | pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t) * MB_BLOCK4x4_NUM); |
| 2653 | 2653 | for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) { |
| 2654 | 2654 | uint32_t i = 0; |
| 2655 | − while (pCtx->sRefPic.pRefList[listIdx][i]) { | |
| 2655 | + while (pCtx->sRefPic.pRefList[listIdx][i] && i < MAX_DPB_COUNT) { | |
| 2656 | 2656 | pCtx->pDec->pRefPic[listIdx][i] = pCtx->sRefPic.pRefList[listIdx][i]; |
| 2657 | 2657 | ++i; |
| 2658 | 2658 | } |