Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 1 file). Show all
Unified · Split
| @@ -2345,7 +2345,8 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 2344 unmodified lines | |||
| 2345 | } | 2345 | } |
| 2346 | 2346 | ||
| 2347 | // need update frame_num due current frame is well decoded | 2347 | // need update frame_num due current frame is well decoded |
| 2348 | pCtx->iPrevFrameNum = pSh->iFrameNum; | 2348 | if (pCurAu->pNalUnitsList[pCurAu->uiStartPos]->sNalHeaderExt.sNalUnitHeader.uiNalRefIdc > 0) |
| 2349 | pCtx->iPrevFrameNum = pSh->iFrameNum; | ||
| 2349 | if (pCtx->bLastHasMmco5) | 2350 | if (pCtx->bLastHasMmco5) |
| 2350 | pCtx->iPrevFrameNum = 0; | 2351 | pCtx->iPrevFrameNum = 0; |
| 2351 | } | 2352 | } |
| @@ -2403,7 +2404,8 @@ bool CheckAndFinishLastPic (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferIn · 51 unmodified lines | |||
| 2403 | } | 2404 | } |
| 2404 | } | 2405 | } |
| 2405 | pCtx->pDec = NULL; | 2406 | pCtx->pDec = NULL; |
| 2406 | pCtx->iPrevFrameNum = pCtx->sLastSliceHeader.iFrameNum; //save frame_num | 2407 | if (pAu->pNalUnitsList[pAu->uiStartPos]->sNalHeaderExt.sNalUnitHeader.uiNalRefIdc > 0) |
| 2408 | pCtx->iPrevFrameNum = pCtx->sLastSliceHeader.iFrameNum; //save frame_num | ||
| 2407 | if (pCtx->bLastHasMmco5) | 2409 | if (pCtx->bLastHasMmco5) |
| 2408 | pCtx->iPrevFrameNum = 0; | 2410 | pCtx->iPrevFrameNum = 0; |
| 2409 | } | 2411 | } |