ref: cef43e30fe3bb83ca72bdf431ac5fa7efa356dc2
parent: c1cc195ab1a389e8dbad22b588e413490fa13d30
parent: b5a01efa967aabb90a69eb366eda0b3cc3bdfa67
author: dongzha <dongzha@cisco.com>
date: Tue Sep 2 11:50:04 EDT 2014
Merge pull request #1321 from ruil2/ltr_check avoid LTR reference frames overflow
--- a/codec/encoder/core/src/ref_list_mgr_svc.cpp
+++ b/codec/encoder/core/src/ref_list_mgr_svc.cpp
@@ -315,6 +315,10 @@
}
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);
}
}