avoid LTR reference frames overflow

This commit is contained in:
ruil2 2014-09-02 10:23:03 +08:00
parent c1cc195ab1
commit b5a01efa96

View File

@ -315,6 +315,10 @@ static inline void LTRMarkProcess (sWelsEncCtx* pCtx) {
}
pLongRefList[0] = pShortRefList[i];
pRefList->uiLongRefCount++;
if (pRefList->uiLongRefCount > pCtx->pSvcParam->iLTRRefNum) {
SetUnref (pRefList->pLongRefList[pRefList->uiLongRefCount - 1]);
DeleteLTRFromLongList (pCtx, pRefList->uiLongRefCount - 1);
}
DeleteSTRFromShortList (pCtx, i);
}
}