webrtcbin: Don't consider transceivers without mid as inactive during ICE gathering...
authorSebastian Dröge <sebastian@centricular.com>
Thu, 9 Jan 2020 10:32:24 +0000 (12:32 +0200)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sun, 19 Jan 2020 10:47:59 +0000 (10:47 +0000)
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

index 6dcd672..6a8afdb 100644 (file)
@@ -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);