History

prevent error propagation for parse only when frame is not complete

huili2 committed 11 years ago

Commit e4858521 parent d92853c1 file · +8 −3Browse files

Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 1 file). Show all

Unified · Split

codec/decoder/core/src/decoder_core.cpp+8−3
@@ -1762,7 +1762,8 @@ int32_t ConstructAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferI · 1761 unmodified lines
17621762 iErr = DecodeCurrentAccessUnit (pCtx, ppDst, pDstInfo);
17631763
17641764 if (pCtx->bParseOnly) {
1765− if ((dsErrorFree == pCtx->iErrorCode) && ((uint32_t) pCtx->iTotalNumMbRec == pCtx->pSps->iMbHeight * pCtx->pSps->iMbWidth)) {
1765+ if ((dsErrorFree == pCtx->iErrorCode)
1766+ && ((uint32_t) pCtx->iTotalNumMbRec == pCtx->pSps->iMbHeight * pCtx->pSps->iMbWidth)) {
17661767 SParserBsInfo* pParser = pCtx->pParserBsInfo;
17671768 uint8_t* pDstBuf = pParser->pDstBuff;
17681769 SNalUnit* pCurNal = NULL;
@@ -2128,6 +2129,10 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 359 unmodified lines
21282129 pCtx->pDec->bIsComplete = bAllRefComplete;
21292130 if (!pCtx->pDec->bIsComplete) { // Ref pictures ECed, result in ECed
21302131 pCtx->iErrorCode |= dsDataErrorConcealed;
2132+ } else if (pCtx->bParseOnly) {
2133+ pCtx->pDec->bIsComplete = (pCtx->iTotalNumMbRec == pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight);
2134+ if (!pCtx->pDec->bIsComplete)
2135+ return -1;
21312136 }
21322137
21332138 // A dq layer decoded here
@@ -2165,8 +2170,8 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 31 unmodified lines
21652170 }
21662171 if (!pCtx->bParseOnly)
21672172 ExpandReferencingPicture (pCtx->pDec->pData, pCtx->pDec->iWidthInPixel, pCtx->pDec->iHeightInPixel,
2168− pCtx->pDec->iLinesize,
2169− pCtx->sExpandPicFunc.pfExpandLumaPicture, pCtx->sExpandPicFunc.pfExpandChromaPicture);
2173+ pCtx->pDec->iLinesize,
2174+ pCtx->sExpandPicFunc.pfExpandLumaPicture, pCtx->sExpandPicFunc.pfExpandChromaPicture);
21702175 }
21712176 pCtx->pDec = NULL; //after frame decoding, always set to NULL
21722177 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t