ref: b9f937826ace85e6d1a0fae9544e9aa811cc6c5d
parent: c87672974d41b43454395f07f3d229b9a5c78ad7
parent: 0ffc5ea47d09778a50edafed29a3a664c2f4f3f3
author: sijchen <[email protected]>
date: Fri Feb 8 08:47:55 EST 2019
Merge pull request #3097 from xiaotiansf/NewBugzilla2 Refix and re-submit Bugzilla reported bug-1525097 as single change.
--- a/codec/decoder/core/src/decoder_core.cpp
+++ b/codec/decoder/core/src/decoder_core.cpp
@@ -2652,7 +2652,7 @@
pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t) * MB_BLOCK4x4_NUM);
for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
uint32_t i = 0;
- while (pCtx->sRefPic.pRefList[listIdx][i] && i < MAX_DPB_COUNT) {
+ while (i < MAX_DPB_COUNT && pCtx->sRefPic.pRefList[listIdx][i]) {
pCtx->pDec->pRefPic[listIdx][i] = pCtx->sRefPic.pRefList[listIdx][i];
++i;
}