shithub: openh264

Download patch

ref: 0ffc5ea47d09778a50edafed29a3a664c2f4f3f3
parent: c87672974d41b43454395f07f3d229b9a5c78ad7
author: xiaotiansf <[email protected]>
date: Fri Feb 8 03:40:08 EST 2019

Refix Bugzilla reported bug-1525097.

--- 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;
           }