mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
UTest: Fix crash for stack overflow, allocate object on heap. (#3394)
* UTest: Fix crash for stack overflow, allocate object on heap. * H265: Refine hevc vps/sps/pps id range. --------- Co-authored-by: chundonglinlin <chundonglinlin@163.com>
This commit is contained in:
parent
6dd1536186
commit
913dcb4406
3 changed files with 56 additions and 34 deletions
|
@ -490,6 +490,20 @@ struct SrsHevcHvccNalu {
|
|||
std::vector<SrsHevcNalData> nal_data_vec;
|
||||
};
|
||||
|
||||
/**
|
||||
* HEVC Common Max define.
|
||||
* @doc ITU-T-H.265-2021.pdf
|
||||
*/
|
||||
// @see F.7.3.2.1: vps_video_parameter_set_id is u(4).
|
||||
// @doc ITU-T-H.265-2021.pdf, page 464.
|
||||
const int SrsHevcMax_VPS_COUNT = 16;
|
||||
// @see 7.4.3.2.1: sps_seq_parameter_set_id is in [0, 15].
|
||||
// @doc ITU-T-H.265-2021.pdf, page 95.
|
||||
const int SrsHevcMax_SPS_COUNT = 16;
|
||||
// @see 7.4.3.3.1: pps_pic_parameter_set_id is in [0, 63].
|
||||
// @doc ITU-T-H.265-2021.pdf, page 102.
|
||||
const int SrsHevcMax_PPS_COUNT = 64;
|
||||
|
||||
/**
|
||||
* Profile, tier and level
|
||||
* @see 7.3.3 Profile, tier and level syntax
|
||||
|
@ -903,9 +917,9 @@ struct SrsHevcDecoderConfigurationRecord
|
|||
uint8_t length_size_minus_one;
|
||||
std::vector<SrsHevcHvccNalu> nalu_vec;
|
||||
|
||||
SrsHevcRbspVps vps_table[16];
|
||||
SrsHevcRbspSps sps_table[32];
|
||||
SrsHevcRbspPps pps_table[256];
|
||||
SrsHevcRbspVps vps_table[SrsHevcMax_VPS_COUNT];
|
||||
SrsHevcRbspSps sps_table[SrsHevcMax_SPS_COUNT];
|
||||
SrsHevcRbspPps pps_table[SrsHevcMax_PPS_COUNT];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue