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
This commit is contained in:
Naveen Kumar P 2018-01-03 13:46:18 +05:30 committed by Ray Essick
parent 6a587c6be7
commit df865d1a3d

View file

@ -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;
}