modify sequence to fix bug for LTR feedback info
Unified · Split
| @@ -333,15 +333,15 @@ static int32_t MMCOProcess (PWelsDecoderContext pCtx, uint32_t uiMmcoType, · 332 unmodified lines | ||
| 333 | 333 | if (iLongTermFrameIdx > pRefPic->iMaxLongTermFrameIdx) { |
| 334 | 334 | return ERR_INFO_INVALID_MMCO_LONG_TERM_IDX_EXCEED_MAX; |
| 335 | 335 | } |
| 336 | + WelsDelLongFromListSetUnref (pRefPic, iLongTermFrameIdx); | |
| 337 | + if (pRefPic->uiLongRefCount[LIST_0] + pRefPic->uiShortRefCount[LIST_0] >= WELS_MAX(1,pCtx->pSps->iNumRefFrames)) { | |
| 338 | + return ERR_INFO_INVALID_MMCO_REF_NUM_OVERFLOW; | |
| 339 | + } | |
| 336 | 340 | #ifdef LONG_TERM_REF |
| 337 | 341 | pCtx->bCurAuContainLtrMarkSeFlag = true; |
| 338 | 342 | pCtx->iFrameNumOfAuMarkedLtr = pCtx->iFrameNum; |
| 339 | 343 | WelsLog (pCtx, WELS_LOG_INFO, "ex_mark_avc():::MMCO_LONG:::LTR marking....iFrameNum: %d\n", pCtx->iFrameNum); |
| 340 | 344 | #endif |
| 341 | − WelsDelLongFromListSetUnref (pRefPic, iLongTermFrameIdx); | |
| 342 | − if (pRefPic->uiLongRefCount[LIST_0] + pRefPic->uiShortRefCount[LIST_0] >= WELS_MAX(1,pCtx->pSps->iNumRefFrames)) { | |
| 343 | − return ERR_INFO_INVALID_MMCO_REF_NUM_OVERFLOW; | |
| 344 | − } | |
| 345 | 345 | iRet = AddLongTermToList (pRefPic, pCtx->pDec, iLongTermFrameIdx); |
| 346 | 346 | break; |
| 347 | 347 | default : |