use my pr-sps-overflow branch of h264-reader

This makes fuzz testing get a bit farther at least.
This commit is contained in:
Scott Lamb 2021-06-07 21:30:18 -07:00
parent 45147200ce
commit 954c181569
5 changed files with 18 additions and 4 deletions

2
Cargo.lock generated
View File

@ -376,7 +376,7 @@ checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189"
[[package]] [[package]]
name = "h264-reader" name = "h264-reader"
version = "0.4.0" version = "0.4.0"
source = "git+https://github.com/dholroyd/h264-reader#dd2d05d54bec596993be9a0833690b54219f6778" source = "git+https://github.com/scottlamb/h264-reader?branch=pr-sps-overflow#7d347e160ff73dcb8ae4680513db2618efe9c28d"
dependencies = [ dependencies = [
"bitreader", "bitreader",
"memchr", "memchr",

View File

@ -17,7 +17,7 @@ digest_auth = "0.3.0"
failure = "0.1.8" failure = "0.1.8"
futures = "0.3.14" futures = "0.3.14"
hex = "0.4.3" hex = "0.4.3"
h264-reader = { git = "https://github.com/dholroyd/h264-reader" } h264-reader = { git = "https://github.com/scottlamb/h264-reader", branch = "pr-sps-overflow" }
log = "0.4.8" log = "0.4.8"
once_cell = "1.7.2" once_cell = "1.7.2"
pin-project = "1.0.7" pin-project = "1.0.7"

2
fuzz/Cargo.lock generated
View File

@ -336,7 +336,7 @@ checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189"
[[package]] [[package]]
name = "h264-reader" name = "h264-reader"
version = "0.4.0" version = "0.4.0"
source = "git+https://github.com/dholroyd/h264-reader#dd2d05d54bec596993be9a0833690b54219f6778" source = "git+https://github.com/scottlamb/h264-reader?branch=pr-sps-overflow#7d347e160ff73dcb8ae4680513db2618efe9c28d"
dependencies = [ dependencies = [
"bitreader", "bitreader",
"memchr", "memchr",

View File

@ -34,6 +34,7 @@ fuzz_target!(|data: &[u8]| {
mark, mark,
payload: data.split_off(usize::from(len)), payload: data.split_off(usize::from(len)),
}; };
//println!("pkt: {:#?}", pkt);
if depacketizer.push(pkt).is_err() { if depacketizer.push(pkt).is_err() {
return; return;
} }

View File

@ -11,7 +11,6 @@ use pretty_hex::PrettyHex;
use crate::client::PacketItem; use crate::client::PacketItem;
/// An RTP packet. /// An RTP packet.
#[derive(Debug)]
pub struct Packet { pub struct Packet {
pub rtsp_ctx: crate::Context, pub rtsp_ctx: crate::Context,
pub stream_id: usize, pub stream_id: usize,
@ -32,6 +31,20 @@ pub struct Packet {
pub payload: Bytes, pub payload: Bytes,
} }
impl std::fmt::Debug for Packet {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("Packet")
.field("rtsp_ctx", &self.rtsp_ctx)
.field("stream_id", &self.stream_id)
.field("timestamp", &self.timestamp)
.field("sequence_number", &self.sequence_number)
.field("loss", &self.loss)
.field("mark", &self.mark)
.field("payload", &self.payload.hex_dump())
.finish()
}
}
/// An RTCP sender report. /// An RTCP sender report.
#[derive(Debug)] #[derive(Debug)]
pub struct SenderReport { pub struct SenderReport {