Skip to main content

parse_h264_sps

Function parse_h264_sps 

Source
pub fn parse_h264_sps(sample: &[u8]) -> Option<H264SpsInfo>
Expand description

Full H.264 SPS walker — see §7.3.2.1.1 + §7.4.2.1.1. The parse is greedy: profile_idc + chroma fields are populated first, then we walk the variable-length sections (scaling lists, pic_order_cnt_type branch) to reach pic_width_in_mbs_minus1 etc. If any of those sections hit end-of-buffer the dims come back as None but the early fields are returned.