History

when sps/pps non exist, return dsNoParamSets

huili2 committed 12 years ago

Commit 0227f871 parent c1cc1951 file · +5 −1Browse 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+5−1
@@ -537,13 +537,15 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 536 unmodified lines
537 //add check PPS available here537 //add check PPS available here
538 if (pCtx->bPpsAvailFlags[iPpsId] == false) {538 if (pCtx->bPpsAvailFlags[iPpsId] == false) {
539 WelsLog (pLogCtx, WELS_LOG_ERROR, "PPS id is invalid!");539 WelsLog (pLogCtx, WELS_LOG_ERROR, "PPS id is invalid!");
540 pCtx->iErrorCode |= dsNoParamSets;
540 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_PPS_ID);541 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_PPS_ID);
541 }542 }
542 543
543 pPps = &pCtx->sPpsBuffer[iPpsId];544 pPps = &pCtx->sPpsBuffer[iPpsId];
544 545
545 if (pPps->uiNumSliceGroups == 0) {546 if (pPps->uiNumSliceGroups == 0) {
546 WelsLog (pLogCtx, WELS_LOG_WARNING, "non existing PPS referenced");547 WelsLog (pLogCtx, WELS_LOG_WARNING, "Invalid PPS referenced");
548 pCtx->iErrorCode |= dsNoParamSets;
547 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_NO_PARAM_SETS);549 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_NO_PARAM_SETS);
548 }550 }
549 551
@@ -552,11 +554,13 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 2 unmodified lines
552 pSps = &pSubsetSps->sSps;554 pSps = &pSubsetSps->sSps;
553 if (pCtx->bSubspsAvailFlags[pPps->iSpsId] == false) {555 if (pCtx->bSubspsAvailFlags[pPps->iSpsId] == false) {
554 WelsLog (pLogCtx, WELS_LOG_ERROR, "SPS id is invalid!");556 WelsLog (pLogCtx, WELS_LOG_ERROR, "SPS id is invalid!");
557 pCtx->iErrorCode |= dsNoParamSets;
555 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SPS_ID);558 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SPS_ID);
556 }559 }
557 } else {560 } else {
558 if (pCtx->bSpsAvailFlags[pPps->iSpsId] == false) {561 if (pCtx->bSpsAvailFlags[pPps->iSpsId] == false) {
559 WelsLog (pLogCtx, WELS_LOG_ERROR, "SPS id is invalid!");562 WelsLog (pLogCtx, WELS_LOG_ERROR, "SPS id is invalid!");
563 pCtx->iErrorCode |= dsNoParamSets;
560 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SPS_ID);564 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SPS_ID);
561 }565 }
562 pSps = &pCtx->sSpsBuffer[pPps->iSpsId];566 pSps = &pCtx->sSpsBuffer[pPps->iSpsId];

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