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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2310>
This commit is contained in:
Sebastian Dröge 2021-06-08 11:40:14 +03:00 committed by GStreamer Marge Bot
parent 4efdb40f43
commit 7ee8f4539e

View file

@ -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);