oa::video::length_prefixed_to_annex_b

Convert an MP4 length-prefixed H.264/H.265 sample into Annex-B NAL units. Errors Returns an error for a length width other than 1, 2, or 4, a truncated length field, a zero-sized NAL unit, arithmetic overflow, or payload overrun.

FnRust public API

Function Documentation

pub fn length_prefixed_to_annex_b( sample: &[u8], length_size: usize ) -> Result<Vec<u8>>
Convert an MP4 length-prefixed H.264/H.265 sample into Annex-B NAL units. Errors Returns an error for a length width other than 1, 2, or 4, a truncated length field, a zero-sized NAL unit, arithmetic overflow, or payload overrun.