diff options
author | Mark Salyzyn <salyzyn@google.com> | 2017-05-11 08:19:17 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2017-05-11 15:23:00 +0000 |
commit | 5e17a2046b9bb0087c936594f4a9fd18a556fa24 (patch) | |
tree | 9cf2a4ad343495e1a6aec7ed234a12ed7066186d | |
parent | af6ce4991f9502bc40ed6f7eb5f5a506c602e139 (diff) | |
parent | 8dc7b42e6593f5ce4fff187ab4e79b9f1ca318df (diff) | |
download | libhevc-5e17a2046b9bb0087c936594f4a9fd18a556fa24.tar.gz |
resolve merge conflicts of 8dc7b42 to mnc-dr-dev
Test: I solemnly swear I tested this conflict resolution.
Bug: 34896431
Change-Id: I670a2d2025f52b0197651bd4bb2acbc4887e0447
-rw-r--r-- | common/ihevc_defs.h | 1 | ||||
-rw-r--r-- | decoder/ihevcd_parse_headers.c | 17 |
2 files changed, 13 insertions, 5 deletions
diff --git a/common/ihevc_defs.h b/common/ihevc_defs.h index a2b7eda..946687f 100644 --- a/common/ihevc_defs.h +++ b/common/ihevc_defs.h @@ -464,7 +464,6 @@ typedef enum { */ #define INTRA_PRED_CHROMA_IDX_NONE 7 - #define MAX_NUM_CLOCK_TS 3 #define MAX_USERDATA_PAYLOAD 256 diff --git a/decoder/ihevcd_parse_headers.c b/decoder/ihevcd_parse_headers.c index 4c38b0a..0f30620 100644 --- a/decoder/ihevcd_parse_headers.c +++ b/decoder/ihevcd_parse_headers.c @@ -644,6 +644,9 @@ static WORD32 ihevcd_parse_hrd_parameters(bitstrm_t *ps_bitstrm, if(!ps_hrd->au1_low_delay_hrd_flag[i]) UEV_PARSE("cpb_cnt_minus1[ i ]", ps_hrd->au1_cpb_cnt_minus1[i], ps_bitstrm); + if(ps_hrd->au1_cpb_cnt_minus1[i] >= (MAX_CPB_CNT - 1)) + return IHEVCD_INVALID_PARAMETER; + if(ps_hrd->u1_nal_hrd_parameters_present_flag) ihevcd_parse_sub_layer_hrd_parameters(ps_bitstrm, &ps_hrd->as_sub_layer_hrd_params[i], @@ -742,7 +745,10 @@ static WORD32 ihevcd_parse_vui_parameters(bitstrm_t *ps_bitstrm, BITS_PARSE("vui_hrd_parameters_present_flag", ps_vui->u1_vui_hrd_parameters_present_flag, ps_bitstrm, 1); if(ps_vui->u1_vui_hrd_parameters_present_flag) - ihevcd_parse_hrd_parameters(ps_bitstrm, &ps_vui->s_vui_hrd_parameters, 1, sps_max_sub_layers_minus1); + { + ret = ihevcd_parse_hrd_parameters(ps_bitstrm, &ps_vui->s_vui_hrd_parameters, 1, sps_max_sub_layers_minus1); + RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret); + } } BITS_PARSE("bitstream_restriction_flag", ps_vui->u1_bitstream_restriction_flag, ps_bitstrm, 1); @@ -1454,9 +1460,12 @@ IHEVCD_ERROR_T ihevcd_parse_sps(codec_t *ps_codec) ps_sps->i1_vui_parameters_present_flag = value; if(ps_sps->i1_vui_parameters_present_flag) - ihevcd_parse_vui_parameters(ps_bitstrm, - &ps_sps->s_vui_parameters, - ps_sps->i1_sps_max_sub_layers - 1); + { + ret = ihevcd_parse_vui_parameters(ps_bitstrm, + &ps_sps->s_vui_parameters, + ps_sps->i1_sps_max_sub_layers - 1); + RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret); + } BITS_PARSE("sps_extension_flag", value, ps_bitstrm, 1); |