From 67a6ab401b90445169ae35a4107a9973474f8073 Mon Sep 17 00:00:00 2001 From: trilene Date: Fri, 28 Aug 2020 10:49:39 -0400 Subject: [PATCH] Link GStreamer elements before syncing state --- src/WebRTCSession.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/WebRTCSession.cpp b/src/WebRTCSession.cpp index b4e7eeb3..f5dc49d8 100644 --- a/src/WebRTCSession.cpp +++ b/src/WebRTCSession.cpp @@ -283,11 +283,11 @@ linkNewPad(GstElement *decodebin G_GNUC_UNUSED, GstPad *newpad, GstElement *pipe GstElement *resample = gst_element_factory_make("audioresample", nullptr); GstElement *sink = gst_element_factory_make("autoaudiosink", nullptr); gst_bin_add_many(GST_BIN(pipe), queue, convert, resample, sink, nullptr); + gst_element_link_many(queue, convert, resample, sink, nullptr); gst_element_sync_state_with_parent(queue); gst_element_sync_state_with_parent(convert); gst_element_sync_state_with_parent(resample); gst_element_sync_state_with_parent(sink); - gst_element_link_many(queue, convert, resample, sink, nullptr); queuepad = gst_element_get_static_pad(queue, "sink"); } @@ -448,7 +448,6 @@ WebRTCSession::startPipeline(int opusPayloadType) g_object_set(webrtc_, "stun-server", stunServer_.c_str(), nullptr); } - for (const auto &uri : turnServers_) { nhlog::ui()->info("WebRTC: setting TURN server: {}", uri); gboolean udata;