webrtcbin: Use the correct media for deciding the media kind when creating the transc...
authorSebastian Dröge <sebastian@centricular.com>
Thu, 12 Aug 2021 12:25:50 +0000 (15:25 +0300)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 12 Aug 2021 12:31:15 +0000 (12:31 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2464>

ext/webrtc/gstwebrtcbin.c

index 88f956b..f5a8303 100644 (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;