avoid LTR reference frames overflow
Unified · Split
| @@ -315,6 +315,10 @@ static inline void LTRMarkProcess (sWelsEncCtx* pCtx) { · 314 unmodified lines | ||
| 315 | 315 | } |
| 316 | 316 | pLongRefList[0] = pShortRefList[i]; |
| 317 | 317 | pRefList->uiLongRefCount++; |
| 318 | + if (pRefList->uiLongRefCount > pCtx->pSvcParam->iLTRRefNum) { | |
| 319 | + SetUnref (pRefList->pLongRefList[pRefList->uiLongRefCount - 1]); | |
| 320 | + DeleteLTRFromLongList (pCtx, pRefList->uiLongRefCount - 1); | |
| 321 | + } | |
| 318 | 322 | DeleteSTRFromShortList (pCtx, i); |
| 319 | 323 | } |
| 320 | 324 | } |