Skip to content

Commit 11ffde7

Browse files
committed
fix the SDP munging
1 parent 0791d97 commit 11ffde7

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

webrtc_peer.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,10 @@ def on_negotiation_created(self, promise, kind):
199199
result = reply.get_value(kind)
200200
text = result.sdp.as_text()
201201

202-
# 1.16 generates sprop-parameter-sets containing the substring "DAILS", 1.18 contains "DAwNS".
202+
# Different GStreamer versions generate slightly different sprop-parameter-sets.
203203
# This can confuse caps negotiation on the client side, and subsequently transceiver matching.
204204
# To avoid this issue altogether, get rid of the entire SPS parameter in the generated SDP.
205-
text = re.sub(";sprop-parameter-sets=.*","",text)
206-
207-
# 1.20 doesn't properly set the profile-level-id, so chuck in a generic one to appease FF
208-
text = re.sub("packetization-mode=1$","packetization-mode=1;level-asymmetry-allowed=1;profile-level-id=42e01f",text,flags=re.M)
205+
text = re.sub(";?sprop-parameter-sets=.*?(;|\r\n)","\\1",text)
209206

210207
# FIXME this is an extremly ugly hack, treating SDP as "string soup"
211208
# see https://stackoverflow.com/q/65408744/838719 for some background

0 commit comments

Comments
 (0)