From 7ee8f4539ea49a72564b90091482b0f76c7c8bf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 8 Jun 2021 11:40:14 +0300 Subject: webrtcbin: Store newly created transceivers when creating an answer also in the seen transceivers list Otherwise it might be used a second time for another media afterwards. Part-of: --- ext/webrtc/gstwebrtcbin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext') diff --git a/ext/webrtc/gstwebrtcbin.c b/ext/webrtc/gstwebrtcbin.c index 88702357c..351bddd6d 100644 --- a/ext/webrtc/gstwebrtcbin.c +++ b/ext/webrtc/gstwebrtcbin.c @@ -3710,8 +3710,6 @@ _create_answer_task (GstWebRTCBin * webrtc, const GstStructure * options, answer_dir = GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_RECVONLY; } - seen_transceivers = g_list_prepend (seen_transceivers, rtp_trans); - if (!rtp_trans) { GstCaps *trans_caps; @@ -3743,6 +3741,8 @@ _create_answer_task (GstWebRTCBin * webrtc, const GstStructure * options, trans = WEBRTC_TRANSCEIVER (rtp_trans); } + seen_transceivers = g_list_prepend (seen_transceivers, rtp_trans); + if (gst_caps_is_empty (answer_caps)) { GST_WARNING_OBJECT (webrtc, "Could not create caps for media"); gst_caps_unref (answer_caps); -- cgit v1.2.1