Check limits for log2_max_pic_order_cnt_lsb_minus4 in sps

Bug: 71766721

According to the spec, the value of log2_max_pic_order_cnt_lsb_minus4
shall be in the range of 0 to 12, inclusive.

Change-Id: Ibd199b6dea246c2fac6214c21e49f27d95c07659
This commit is contained in:
Naveen Kumar P 2018-01-19 14:13:55 +05:30 committed by Ray Essick
parent 6a587c6be7
commit 4d32ff55cf

View file

@ -1332,6 +1332,8 @@ IHEVCD_ERROR_T ihevcd_parse_sps(codec_t *ps_codec)
return IHEVCD_UNSUPPORTED_BIT_DEPTH;
UEV_PARSE("log2_max_pic_order_cnt_lsb_minus4", value, ps_bitstrm);
if(value < 0 || value > 12)
return IHEVCD_INVALID_PARAMETER;
ps_sps->i1_log2_max_pic_order_cnt_lsb = value + 4;
BITS_PARSE("sps_sub_layer_ordering_info_present_flag", value, ps_bitstrm, 1);