Skip to main content

split_access_units

Function split_access_units 

Source
pub fn split_access_units(stream: &[u8]) -> Vec<&[u8]>
Expand description

Splits an Annex-B byte stream into access units, each ending after a VCL (coded-slice) NAL with any preceding parameter-set/SEI NALs attached. Start codes are preserved so each unit can be passed straight to Decoder::decode.

Public because Decoder::decode takes ONE access unit: a caller that wants decode-order pictures, or wants to drop each picture as it arrives instead of accumulating the stream like Decoder::decode_stream, needs this to feed it.