From 2e0e75aedef322baeb829bf5151aba312840ed40 Mon Sep 17 00:00:00 2001 From: Harish Mahendrakar Date: Sat, 22 Apr 2017 11:52:48 +0530 Subject: [PATCH] memset SPS to zero SPS structure is memset to zero in parse_sps() Bug: 33966031 Bug: 37458993 Change-Id: I7d4c04d2d25d7e9c8f581bd470260fc4394a564b --- decoder/ihevcd_parse_headers.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/decoder/ihevcd_parse_headers.c b/decoder/ihevcd_parse_headers.c index ca9a209..da6deea 100644 --- a/decoder/ihevcd_parse_headers.c +++ b/decoder/ihevcd_parse_headers.c @@ -1221,6 +1221,12 @@ IHEVCD_ERROR_T ihevcd_parse_sps(codec_t *ps_codec) ps_sps = (ps_codec->s_parse.ps_sps_base + MAX_SPS_CNT - 1); + /* Reset SPS to zero */ + { + WORD16 *pi2_scaling_mat = ps_sps->pi2_scaling_mat; + memset(ps_sps, 0, sizeof(sps_t)); + ps_sps->pi2_scaling_mat = pi2_scaling_mat; + } ps_sps->i1_sps_id = sps_id; ps_sps->i1_vps_id = vps_id; ps_sps->i1_sps_max_sub_layers = sps_max_sub_layers;