Skip to content

Commit

Permalink
feat: add marker bit when packetizing opus.
Browse files Browse the repository at this point in the history
incase of silence opus rtp payload sets the marker bit after a talking spurt.
usually the data in silence pacekts are empty, just use 1-2 bytes for header.

fixes algesten#125
  • Loading branch information
ramyak-mehra committed Oct 13, 2024
1 parent 5c4c9d5 commit c15137c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/packet/opus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ impl Packetizer for OpusPacketizer {
}

fn is_marker(&mut self, data: &[u8], previous: Option<&[u8]>, last: bool) -> bool {
// TODO: dtx
false
// silence packets are usually empty with 1-2 bytes header
data.len() < 2
}
}

Expand Down

0 comments on commit c15137c

Please sign in to comment.