forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits

mapping.rs18 lines, 642 bytesHistoryRawDownload
1#![no_main]
2
3use ec_ogg::{Mapping, opus_packet_samples};
4use libfuzzer_sys::fuzz_target;
5
6// The first packet of a stream is identified, then every accessor the demuxer reads from it is
7// called. The same bytes are also read as an Opus packet, whose TOC byte sets its duration.
8fuzz_target!(|data: &[u8]| {
9 let _ = opus_packet_samples(data);
10 if let Some(mapping) = Mapping::identify(data) {
11 let _ = mapping.codec();
12 let _ = mapping.time_base();
13 let _ = mapping.sample_rate();
14 let _ = mapping.layout();
15 let _ = mapping.header_packets();
16 let _ = mapping.packet_duration(data);
17 }
18});