ref: 315d9315c4b0390db3b5a7e0b70eeb1d94319d10
parent: cef43e30fe3bb83ca72bdf431ac5fa7efa356dc2
parent: 0227f87b7ac5a5c1519c3301a7cfc9f3f4d2bbfd
author: dongzha <[email protected]>
date: Wed Sep 3 09:56:30 EDT 2014
Merge pull request #1325 from huili2/ps_ne_deal_v1.1.1 when sps/pps non exist, return dsNoParamSets
--- a/codec/decoder/core/src/decoder_core.cpp
+++ b/codec/decoder/core/src/decoder_core.cpp
@@ -537,6 +537,7 @@
//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);
}
@@ -543,7 +544,8 @@
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 @@
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];