From d5e3d13158d945e0aabb549e554611580bb91d84 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 21 Apr 2020 09:11:17 +0200 Subject: [PATCH] do not just assume rtcp-mux --- .../conversations/xmpp/jingle/SessionDescription.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/SessionDescription.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/SessionDescription.java index b7400b5b4..aa33ae41c 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/SessionDescription.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/SessionDescription.java @@ -14,6 +14,7 @@ import java.util.Locale; import java.util.Map; import eu.siacs.conversations.Config; +import eu.siacs.conversations.xml.Namespace; import eu.siacs.conversations.xmpp.jingle.stanzas.Group; import eu.siacs.conversations.xmpp.jingle.stanzas.IceUdpTransportInfo; import eu.siacs.conversations.xmpp.jingle.stanzas.RtpDescription; @@ -53,11 +54,6 @@ public class SessionDescription { } } - public static SessionDescription parse(final Map contents) { - final SessionDescriptionBuilder sessionDescriptionBuilder = new SessionDescriptionBuilder(); - return sessionDescriptionBuilder.createSessionDescription(); - } - public static SessionDescription parse(final String input) { final SessionDescriptionBuilder sessionDescriptionBuilder = new SessionDescriptionBuilder(); MediaBuilder currentMediaBuilder = null; @@ -251,7 +247,10 @@ public class SessionDescription { //random additional attributes mediaAttributes.put("rtcp", "9 IN IP4 0.0.0.0"); mediaAttributes.put("sendrecv", ""); - mediaAttributes.put("rtcp-mux", ""); + + if (description.hasChild("rtcp-mux", Namespace.JINGLE_APPS_RTP)) { + mediaAttributes.put("rtcp-mux", ""); + } final MediaBuilder mediaBuilder = new MediaBuilder(); mediaBuilder.setMedia(description.getMedia().toString().toLowerCase(Locale.ROOT));