diff --git a/net/rtp/src/basepay/imp.rs b/net/rtp/src/basepay/imp.rs index 716d6d38..afd15f52 100644 --- a/net/rtp/src/basepay/imp.rs +++ b/net/rtp/src/basepay/imp.rs @@ -1258,7 +1258,11 @@ impl RtpBasePay2 { return; } - let new_ssrc = if let Ok(suggested_ssrc) = s.get::("suggested-ssrc") { + let new_ssrc = if let Some(suggested_ssrc) = s + .get::("suggested-ssrc") + .ok() + .filter(|suggested_ssrc| *suggested_ssrc != stats.ssrc) + { suggested_ssrc } else { use rand::prelude::*;