Skip to main content

next_start_code

Function next_start_code 

Source
pub fn next_start_code(data: &[u8], from: usize) -> Option<(usize, usize)>
Available on crate features _nal and codec only.
Expand description

Find the next start code at/after from, returning (offset, len) where len is 3 (00 00 01) or 4 (00 00 00 01).

The start code must begin at or after from (its leading zeros are not sought before the origin) — the contract NalIter relies on as it resumes past each consumed NAL.