From f532d523b2e8b52d6300af5a2138f74a11b3a1c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Laignel?= Date: Tue, 24 Sep 2024 23:36:22 +0200 Subject: [PATCH] webrtcsink: fix RFC7273 attributes RFC7273 related attributes are set in the SDP offer by passing them via the transceiver `codec-preferences` signal. These attributes are intended to be set at the media level so they must be prefixed by `a-` in the `Caps` argument to the signal. Otherwise they end up under `a=fmtp`. Part-of: --- net/webrtc/src/webrtcsink/imp.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/webrtc/src/webrtcsink/imp.rs b/net/webrtc/src/webrtcsink/imp.rs index 83e2d719..28bf1f0e 100644 --- a/net/webrtc/src/webrtcsink/imp.rs +++ b/net/webrtc/src/webrtcsink/imp.rs @@ -2167,13 +2167,13 @@ impl BaseWebRTCSink { }; if let Some(ts_refclk) = ts_refclk.as_deref() { - payloader_caps_mut.set("ts-refclk", Some(ts_refclk)); + payloader_caps_mut.set("a-ts-refclk", Some(ts_refclk)); // Set the offset to 0, we will adjust the payloader offsets // when the payloaders are available. - payloader_caps_mut.set("mediaclk", Some("direct=0")); + payloader_caps_mut.set("a-mediaclk", Some("direct=0")); } else { - payloader_caps_mut.set("ts-refclk", Some("local")); - payloader_caps_mut.set("mediaclk", Some("sender")); + payloader_caps_mut.set("a-ts-refclk", Some("local")); + payloader_caps_mut.set("a-mediaclk", Some("sender")); } }