From 638ab65598665bac43a752adc0f277947335fac1 Mon Sep 17 00:00:00 2001 From: Hendry <hendry197@gmail.com> Date: Thu, 12 Nov 2020 11:20:28 -0800 Subject: [PATCH] Add check to ensure the value range for num reordering picture is correct --- source/Lib/DecoderLib/VLCReader.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index 500357231..5bac1bc04 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -1300,6 +1300,7 @@ void HLSyntaxReader::dpb_parameters(int maxSubLayersMinus1, bool subLayerInfoFla pcSPS->setMaxDecPicBuffering(code + 1, i); READ_UVLC(code, "dpb_max_num_reorder_pics[i]"); pcSPS->setMaxNumReorderPics(code, i); + CHECK( pcSPS->getMaxNumReorderPics(i) >= pcSPS->getMaxDecPicBuffering(i), "The value of dpb_max_num_reorder_pics[ i ] shall be in the range of 0 to dpb_max_dec_pic_buffering_minus1[ i ], inclusive" ); READ_UVLC(code, "dpb_max_latency_increase_plus1[i]"); pcSPS->setMaxLatencyIncreasePlus1(code, i); } -- GitLab