Skip to content

Commit

Permalink
default to ignoring rtcp packets with unknown ssrc
Browse files Browse the repository at this point in the history
  • Loading branch information
scottlamb committed Dec 29, 2023
1 parent d7ca4d7 commit 80959ff
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* ignore `seq=0` and `seq=1` in `PLAY` response's `RTP-Info` header by default.
These values are known to be set erroneously by the Hikvision DS-2CD2032-I
and Tapo C320WS, respectively.
* customizable behavior for RTCP packets with unknown ssrcs, now defaulting to
ignoring them. This also is necessary to interoperate with the Tapo C320WS.
* improve some incorrect, misleading, and/or uninformative logging.

## `v0.4.5` (2023-02-02)

Expand Down
2 changes: 1 addition & 1 deletion src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ impl std::str::FromStr for InitialSequenceNumberPolicy {
#[derive(Copy, Clone, Debug, Default)]
#[non_exhaustive]
pub enum UnknownRtcpSsrcPolicy {
/// Default policy: currently same as `AbortSession`.
/// Default policy: currently same as `DropPackets`.
#[default]
Default,

Expand Down
4 changes: 2 additions & 2 deletions src/client/rtp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ impl InorderParser {
let ssrc = sr.ssrc();
if matches!(self.ssrc, Some(s) if s.ssrc != ssrc) {
match self.unknown_rtcp_session {
UnknownRtcpSsrcPolicy::Default | UnknownRtcpSsrcPolicy::AbortSession => {
UnknownRtcpSsrcPolicy::AbortSession => {
note_stale_live555_data_if_tcp(
tool,
session_options,
Expand All @@ -277,7 +277,7 @@ impl InorderParser {
self.ssrc, ssrc
));
}
UnknownRtcpSsrcPolicy::DropPackets => {
UnknownRtcpSsrcPolicy::Default | UnknownRtcpSsrcPolicy::DropPackets => {
if !self.seen_unknown_rtcp_session {
warn!(
"saw unknown rtcp ssrc {ssrc}; rtp session has ssrc {s:?}",
Expand Down

0 comments on commit 80959ff

Please sign in to comment.