webrtcbin: Use the correct media for deciding the media kind when creating the transceiver from the SDP

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2464>
This commit is contained in:
Sebastian Dröge 2021-08-12 15:25:50 +03:00 committed by GStreamer Marge Bot
parent 70ce2327d0
commit 7a03acc546

View file

@ -3718,7 +3718,7 @@ _create_answer_task (GstWebRTCBin * webrtc, const GstStructure * options,
GstCaps *trans_caps;
GstWebRTCKind kind = GST_WEBRTC_KIND_UNKNOWN;
if (g_strcmp0 (gst_sdp_media_get_media (media), "audio") == 0)
if (g_strcmp0 (gst_sdp_media_get_media (offer_media), "audio") == 0)
kind = GST_WEBRTC_KIND_AUDIO;
else
kind = GST_WEBRTC_KIND_VIDEO;