From a63902e621beaf59f18a434197d6728de1d752fe Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Tue, 6 Nov 2018 15:41:28 +1100 Subject: [PATCH] webrtc: fix data channel usage after requiring a READY webrtcbin https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/commit/c4fe52395b21b54fd6ee6b9a5010737404889242 https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/commit/7bf18ad258bfd81200197378dbedde125f813fad Fixes https://github.com/centricular/gstwebrtc-demos/issues/55 --- webrtc/sendrecv/gst/webrtc-sendrecv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webrtc/sendrecv/gst/webrtc-sendrecv.c b/webrtc/sendrecv/gst/webrtc-sendrecv.c index 685ab79478..70396187eb 100644 --- a/webrtc/sendrecv/gst/webrtc-sendrecv.c +++ b/webrtc/sendrecv/gst/webrtc-sendrecv.c @@ -355,6 +355,9 @@ start_pipeline (void) * added by us too, see on_server_message() */ g_signal_connect (webrtc1, "on-ice-candidate", G_CALLBACK (send_ice_candidate_message), NULL); + + gst_element_set_state (pipe1, GST_STATE_READY); + g_signal_emit_by_name (webrtc1, "create-data-channel", "channel", NULL, &send_channel); if (send_channel) {