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
537537 //add check PPS available here
538538 if (pCtx->bPpsAvailFlags[iPpsId] == false) {
539539 WelsLog (pLogCtx, WELS_LOG_ERROR, "PPS id is invalid!");
540+ pCtx->iErrorCode |= dsNoParamSets;
540541 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_PPS_ID);
541542 }
542543
543544 pPps = &pCtx->sPpsBuffer[iPpsId];
544545
545546 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;
547549 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_NO_PARAM_SETS);
548550 }
549551
@@ -552,11 +554,13 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 2 unmodified lines
552554 pSps = &pSubsetSps->sSps;
553555 if (pCtx->bSubspsAvailFlags[pPps->iSpsId] == false) {
554556 WelsLog (pLogCtx, WELS_LOG_ERROR, "SPS id is invalid!");
557+ pCtx->iErrorCode |= dsNoParamSets;
555558 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SPS_ID);
556559 }
557560 } else {
558561 if (pCtx->bSpsAvailFlags[pPps->iSpsId] == false) {
559562 WelsLog (pLogCtx, WELS_LOG_ERROR, "SPS id is invalid!");
563+ pCtx->iErrorCode |= dsNoParamSets;
560564 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SPS_ID);
561565 }
562566 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