sdp: warn and skip streams without media

This commit is contained in:
Wim Taymans 2009-06-03 12:13:21 +02:00
parent 0ea3214326
commit e1765dec13

View file

@ -63,9 +63,19 @@ gst_rtsp_sdp_from_media (GstRTSPMedia *media)
GString *fmtp; GString *fmtp;
stream = gst_rtsp_media_get_stream (media, i); stream = gst_rtsp_media_get_stream (media, i);
gst_sdp_media_new (&smedia);
if (stream->caps == NULL) {
g_warning ("ignoring stream %d without media type", i);
continue;
}
s = gst_caps_get_structure (stream->caps, 0); s = gst_caps_get_structure (stream->caps, 0);
if (s == NULL) {
g_warning ("ignoring stream %d without media type", i);
continue;
}
gst_sdp_media_new (&smedia);
/* get media type and payload for the m= line */ /* get media type and payload for the m= line */
caps_str = gst_structure_get_string (s, "media"); caps_str = gst_structure_get_string (s, "media");