diff --git a/src/packet/opus.rs b/src/packet/opus.rs index 365da501..f8763dfd 100644 --- a/src/packet/opus.rs +++ b/src/packet/opus.rs @@ -23,8 +23,12 @@ impl Packetizer for OpusPacketizer { } fn is_marker(&mut self, data: &[u8], previous: Option<&[u8]>, last: bool) -> bool { - // TODO: dtx - false + match previous { + // silence packets are usually empty with 1-2 bytes header + Some(previous) => previous.len() < 2, + // first packet can always be considered as start of talk spurt + None => true, + } } }