History

add slice_type check for num_ref_frame

huili2 committed 11 years ago

Commit 04007921 parent 87c73071 file · +7 −0Browse 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+7−0
@@ -791,6 +791,13 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 790 unmodified lines
791791
792792 pSliceHeadExt->pSubsetSps = pSubsetSps;
793793
794+ if (pSps->iNumRefFrames == 0) {
795+ if ((uiSliceType != I_SLICE) && (uiSliceType != SI_SLICE)) {
796+ WelsLog (pLogCtx, WELS_LOG_WARNING, "slice_type (%d) not supported for num_ref_frames = 0.", uiSliceType);
797+ return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SLICE_TYPE);
798+ }
799+ }
800+
794801 bIdrFlag = (!kbExtensionFlag && eNalType == NAL_UNIT_CODED_SLICE_IDR) || (kbExtensionFlag && pNalHeaderExt->bIdrFlag);
795802 pSliceHead->bIdrFlag = bIdrFlag;
796803

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