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