Skip to content

Commit

Permalink
Fix to use max_num_ref_frames to check `max_long_term_frame_idx_plu…
Browse files Browse the repository at this point in the history
…s1` value
  • Loading branch information
sile committed Sep 17, 2024
1 parent 3668daf commit 52d2074
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codec/decoder/core/src/decoder_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ int32_t ParseDecRefPicMarking (PWelsDecoderContext pCtx, PBitStringAux pBs, PSli
bMmco4Exist = true;
WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //max_long_term_frame_idx_plus1
int32_t iMaxLongTermFrameIdx = -1 + uiCode;
if (iMaxLongTermFrameIdx > int32_t (pSps->uiLog2MaxFrameNum)) {
if (iMaxLongTermFrameIdx > int32_t (pSps->iNumRefFrames)) {
//ISO/IEC 14496-10:2009(E) 7.4.3.3 Decoded reference picture marking semantics page 96
return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_REF_MARKING);
}
Expand Down

0 comments on commit 52d2074

Please sign in to comment.