From 342a67f69112c7affbc8eb3b1d6e01f13d8dfebd Mon Sep 17 00:00:00 2001 From: stefpi <19478336+stefpi@users.noreply.github.com> Date: Tue, 2 Jun 2026 17:00:20 -0700 Subject: [PATCH] only overwrite host on mDNS address --- teleoprtc/stream.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/teleoprtc/stream.py b/teleoprtc/stream.py index 1750666..f678a46 100644 --- a/teleoprtc/stream.py +++ b/teleoprtc/stream.py @@ -274,8 +274,9 @@ class WebRTCAnswerStream(WebRTCBaseStream): m.rtp.codecs = preferred_codecs m.fmt = [c.payloadType for c in preferred_codecs] + # overwrite mDNS hostnames which crash sdp serialization for m in desc.media: - if m.kind in ["audio", "video"] and m.rtcp_mux: + if m.kind in ["audio", "video"] and m.rtcp_mux and m.rtcp_host and m.rtcp_host.endswith(".local"): m.rtcp_host = "0.0.0.0" return str(desc)