From 47ce34d32c7f4beab0aa5c6de9550bcf20344599 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 9 Jan 2020 12:32:24 +0200 Subject: [PATCH] webrtcbin: Don't consider transceivers without mid as inactive during ICE gathering state updates We don't have any mid before parsing the SDP, which happens after we handled the SDP answer and that usually happens long after ICE candidate gathering is finished. Without this all transceivers are considered inactive and as such ICE gathering is for active transceiver was considered complete from the very beginning. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1126 --- ext/webrtc/gstwebrtcbin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/webrtc/gstwebrtcbin.c b/ext/webrtc/gstwebrtcbin.c index 6dcd672..6a8afdb 100644 --- a/ext/webrtc/gstwebrtcbin.c +++ b/ext/webrtc/gstwebrtcbin.c @@ -907,9 +907,10 @@ _collate_ice_gathering_states (GstWebRTCBin * webrtc) continue; } + /* We only have a mid in the transceiver after we got the SDP answer, + * which is usually long after gathering has finished */ if (!rtp_trans->mid) { GST_TRACE_OBJECT (webrtc, "transceiver %p has no mid", rtp_trans); - continue; } g_object_get (stream, "rtcp-mux", &rtcp_mux, NULL); -- 2.7.4