diff options
Diffstat (limited to 'decoder')
-rw-r--r-- | decoder/ihevcd_parse_headers.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/decoder/ihevcd_parse_headers.c b/decoder/ihevcd_parse_headers.c index f7115cf..ce0e3f8 100644 --- a/decoder/ihevcd_parse_headers.c +++ b/decoder/ihevcd_parse_headers.c @@ -1420,9 +1420,17 @@ IHEVCD_ERROR_T ihevcd_parse_sps(codec_t *ps_codec) ps_sps->i1_log2_diff_max_min_pcm_coding_block_size = 0; UEV_PARSE("max_transform_hierarchy_depth_inter", value, ps_bitstrm); + if(value < 0 || value > (ps_sps->i1_log2_ctb_size - ps_sps->i1_log2_min_transform_block_size)) + { + return IHEVCD_INVALID_PARAMETER; + } ps_sps->i1_max_transform_hierarchy_depth_inter = value; UEV_PARSE("max_transform_hierarchy_depth_intra", value, ps_bitstrm); + if(value < 0 || value > (ps_sps->i1_log2_ctb_size - ps_sps->i1_log2_min_transform_block_size)) + { + return IHEVCD_INVALID_PARAMETER; + } ps_sps->i1_max_transform_hierarchy_depth_intra = value; /* String has a d (enabled) in order to match with HM */ |