disable color format check for parse only
Showing the changes to codec/decoder/core/src/decoder.cpp (1 of 3 files). Show all
Unified · Split
| @@ -516,9 +516,11 @@ int32_t DecoderConfigParam (PWelsDecoderContext pCtx, const SDecodingParam* kpPa · 515 unmodified lines | ||
| 516 | 516 | |
| 517 | 517 | memcpy (pCtx->pParam, kpParam, sizeof (SDecodingParam)); |
| 518 | 518 | pCtx->eOutputColorFormat = pCtx->pParam->eOutputColorFormat; |
| 519 | − int32_t iRet = DecoderSetCsp (pCtx, pCtx->pParam->eOutputColorFormat); | |
| 520 | − if (iRet) | |
| 521 | − return iRet; | |
| 519 | + if (!pCtx->bParseOnly) { | |
| 520 | + int32_t iRet = DecoderSetCsp (pCtx, pCtx->pParam->eOutputColorFormat); | |
| 521 | + if (iRet) | |
| 522 | + return iRet; | |
| 523 | + } | |
| 522 | 524 | pCtx->eErrorConMethod = pCtx->pParam->eEcActiveIdc; |
| 523 | 525 | |
| 524 | 526 | if (pCtx->bParseOnly) //parse only, disable EC method |