Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 1 file). Show all
Unified · Split
| @@ -112,8 +112,6 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 111 unmodified lines | ||
| 112 | 112 | pDstBuf += pPpsBs->uiPpsBsLen; |
| 113 | 113 | pCtx->bFrameFinish = false; |
| 114 | 114 | } |
| 115 | − } else { //IDR required SPS, PPS | |
| 116 | − pCtx->bFrameFinish = true; | |
| 117 | 115 | } |
| 118 | 116 | //then VCL data re-write |
| 119 | 117 | while (iIdx <= iEndIdx) { |
| @@ -127,9 +125,11 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 7 unmodified lines | ||
| 127 | 125 | if (pCtx->iTotalNumMbRec == kiTotalNumMbInCurLayer) { //frame complete |
| 128 | 126 | pCtx->iTotalNumMbRec = 0; |
| 129 | 127 | pCtx->bFramePending = false; |
| 128 | + pCtx->bFrameFinish = true; //finish current frame and mark it | |
| 130 | 129 | } else if (pCtx->iTotalNumMbRec != 0) { //frame incomplete |
| 131 | 130 | pCtx->bFramePending = true; |
| 132 | 131 | pCtx->pDec->bIsComplete = false; |
| 132 | + pCtx->bFrameFinish = false; //current frame not finished | |
| 133 | 133 | pCtx->iErrorCode |= dsFramePending; |
| 134 | 134 | return -1; |
| 135 | 135 | //pCtx->pParserBsInfo->iNalNum = 0; |
| @@ -2100,6 +2100,8 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 1964 unmodified lines | ||
| 2100 | 2100 | return ERR_INFO_REF_COUNT_OVERFLOW; |
| 2101 | 2101 | } |
| 2102 | 2102 | pCtx->pDec->bNewSeqBegin = pCtx->bNewSeqBegin; //set flag for start decoding |
| 2103 | + } else if (pCtx->iTotalNumMbRec == 0) { //pDec != NULL, already start | |
| 2104 | + pCtx->pDec->bNewSeqBegin = pCtx->bNewSeqBegin; //set flag for start decoding | |
| 2103 | 2105 | } |
| 2104 | 2106 | pCtx->pDec->uiTimeStamp = pNalCur->uiTimeStamp; |
| 2105 | 2107 | |