pub fn demux_mp4_packets(
bytes: &[u8],
out: &mut [VideoPacket],
) -> Result<usize, CvError>Expand description
Iterate the FIRST video track’s coded sample packets into the caller’s
buffer. Writes up to out.len() packets and returns the number written.
Timestamps are converted to milliseconds via the track timescale.
is_keyframe comes from each sample’s sync flag.
EmptyInputifbytesis empty.InvalidParameteron parse failure, zero timescale, or no video track.
Never panics.