Merge pull request #1325 from huili2/ps_ne_deal_v1.1.1
when sps/pps non exist, return dsNoParamSets
This commit is contained in:
commit
315d9315c4
@ -537,13 +537,15 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co
|
||||
//add check PPS available here
|
||||
if (pCtx->bPpsAvailFlags[iPpsId] == false) {
|
||||
WelsLog (pLogCtx, WELS_LOG_ERROR, "PPS id is invalid!");
|
||||
pCtx->iErrorCode |= dsNoParamSets;
|
||||
return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_PPS_ID);
|
||||
}
|
||||
|
||||
pPps = &pCtx->sPpsBuffer[iPpsId];
|
||||
|
||||
if (pPps->uiNumSliceGroups == 0) {
|
||||
WelsLog (pLogCtx, WELS_LOG_WARNING, "non existing PPS referenced");
|
||||
WelsLog (pLogCtx, WELS_LOG_WARNING, "Invalid PPS referenced");
|
||||
pCtx->iErrorCode |= dsNoParamSets;
|
||||
return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_NO_PARAM_SETS);
|
||||
}
|
||||
|
||||
@ -552,11 +554,13 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co
|
||||
pSps = &pSubsetSps->sSps;
|
||||
if (pCtx->bSubspsAvailFlags[pPps->iSpsId] == false) {
|
||||
WelsLog (pLogCtx, WELS_LOG_ERROR, "SPS id is invalid!");
|
||||
pCtx->iErrorCode |= dsNoParamSets;
|
||||
return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SPS_ID);
|
||||
}
|
||||
} else {
|
||||
if (pCtx->bSpsAvailFlags[pPps->iSpsId] == false) {
|
||||
WelsLog (pLogCtx, WELS_LOG_ERROR, "SPS id is invalid!");
|
||||
pCtx->iErrorCode |= dsNoParamSets;
|
||||
return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SPS_ID);
|
||||
}
|
||||
pSps = &pCtx->sSpsBuffer[pPps->iSpsId];
|
||||
|
Loading…
x
Reference in New Issue
Block a user