if (g_strcmp0 (gst_sdp_media_get_media (offer_media), "audio") == 0)
kind = GST_WEBRTC_KIND_AUDIO;
- else
+ else if (g_strcmp0 (gst_sdp_media_get_media (offer_media),
+ "video") == 0)
kind = GST_WEBRTC_KIND_VIDEO;
+ else
+ GST_LOG_OBJECT (webrtc, "Unknown media kind %s",
+ GST_STR_NULL (gst_sdp_media_get_media (offer_media)));
trans = _create_webrtc_transceiver (webrtc, answer_dir, i, kind, NULL);
rtp_trans = GST_WEBRTC_RTP_TRANSCEIVER (trans);
GST_LOG_OBJECT (webrtc, "Created new transceiver %" GST_PTR_FORMAT
- " for mline %u", trans, i);
+ " for mline %u with media kind %d", trans, i, kind);
trans_caps = _find_codec_preferences (webrtc, rtp_trans, i, error);
if (*error) {
if (!trans) {
if (g_strcmp0 (gst_sdp_media_get_media (media), "audio") == 0)
kind = GST_WEBRTC_KIND_AUDIO;
- else
+ else if (g_strcmp0 (gst_sdp_media_get_media (media), "video") == 0)
kind = GST_WEBRTC_KIND_VIDEO;
+ else
+ GST_LOG_OBJECT (webrtc, "Unknown media kind %s",
+ GST_STR_NULL (gst_sdp_media_get_media (media)));
trans = _find_transceiver (webrtc, GINT_TO_POINTER (kind),
(FindTransceiverFunc) _find_compatible_unassociated_transceiver);