Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 1 file). Show all
Unified · Split
| @@ -1762,7 +1762,8 @@ int32_t ConstructAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferI · 1761 unmodified lines | ||
| 1762 | 1762 | iErr = DecodeCurrentAccessUnit (pCtx, ppDst, pDstInfo); |
| 1763 | 1763 | |
| 1764 | 1764 | 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)) { | |
| 1766 | 1767 | SParserBsInfo* pParser = pCtx->pParserBsInfo; |
| 1767 | 1768 | uint8_t* pDstBuf = pParser->pDstBuff; |
| 1768 | 1769 | SNalUnit* pCurNal = NULL; |
| @@ -2128,6 +2129,10 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 359 unmodified lines | ||
| 2128 | 2129 | pCtx->pDec->bIsComplete = bAllRefComplete; |
| 2129 | 2130 | if (!pCtx->pDec->bIsComplete) { // Ref pictures ECed, result in ECed |
| 2130 | 2131 | 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; | |
| 2131 | 2136 | } |
| 2132 | 2137 | |
| 2133 | 2138 | // A dq layer decoded here |
| @@ -2165,8 +2170,8 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 31 unmodified lines | ||
| 2165 | 2170 | } |
| 2166 | 2171 | if (!pCtx->bParseOnly) |
| 2167 | 2172 | 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); | |
| 2170 | 2175 | } |
| 2171 | 2176 | pCtx->pDec = NULL; //after frame decoding, always set to NULL |
| 2172 | 2177 | } |