From df865d1a3d988bc57323a34ac95eca0053c7c8a2 Mon Sep 17 00:00:00 2001 From: Naveen Kumar P Date: Wed, 3 Jan 2018 13:46:18 +0530 Subject: [PATCH] Update sps id after decoding the sps The update of sps_id in ps_codec is moved to the end of the sps parsing function to ensure the sps is completely parsed without any error Bug: 71567394 Test: poc before/after Change-Id: I072b7e0486170ffc46b5c6807aca492013b1b06e --- decoder/ihevcd_parse_headers.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/decoder/ihevcd_parse_headers.c b/decoder/ihevcd_parse_headers.c index f0eb405..122f482 100644 --- a/decoder/ihevcd_parse_headers.c +++ b/decoder/ihevcd_parse_headers.c @@ -1238,8 +1238,7 @@ IHEVCD_ERROR_T ihevcd_parse_sps(codec_t *ps_codec) ps_sps->i1_vps_id = vps_id; ps_sps->i1_sps_max_sub_layers = sps_max_sub_layers; ps_sps->i1_sps_temporal_id_nesting_flag = sps_temporal_id_nesting_flag; - /* This is used only during initialization to get reorder count etc */ - ps_codec->i4_sps_id = sps_id; + memcpy(&ps_sps->s_ptl, &s_ptl, sizeof(profile_tier_lvl_info_t)); UEV_PARSE("chroma_format_idc", value, ps_bitstrm); @@ -1600,6 +1599,9 @@ IHEVCD_ERROR_T ihevcd_parse_sps(codec_t *ps_codec) } } + /* This is used only during initialization to get reorder count etc */ + ps_codec->i4_sps_id = sps_id; + ps_codec->i4_sps_done = 1; return ret; }