rtp: basepay: Don't use suggested SSRC on collissions if it's the current one

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1693>
This commit is contained in:
Sebastian Dröge 2024-08-06 15:17:10 +03:00 committed by GStreamer Marge Bot
parent 9080c90120
commit 035a199109

View file

@ -1258,7 +1258,11 @@ impl RtpBasePay2 {
return;
}
let new_ssrc = if let Ok(suggested_ssrc) = s.get::<u32>("suggested-ssrc") {
let new_ssrc = if let Some(suggested_ssrc) = s
.get::<u32>("suggested-ssrc")
.ok()
.filter(|suggested_ssrc| *suggested_ssrc != stats.ssrc)
{
suggested_ssrc
} else {
use rand::prelude::*;