rtspsrc: handle NULL and empty transport strings

When an RTSP extension returns NULL or an empty transport string, just ignore it
and try to get the next possible transport. Fixes playback of RealMedia streams.
This commit is contained in:
Wim Taymans 2009-12-10 18:43:44 +01:00
parent 6a44d8e198
commit b8c2ccce4e

View file

@ -4310,6 +4310,7 @@ gst_rtspsrc_setup_streams (GstRTSPSrc * src)
GST_DEBUG_OBJECT (src, "doing setup of stream %p with %s", stream,
stream->setup_url);
next_protocol:
/* first selectable protocol */
while (protocol_masks[mask] && !(protocols & protocol_masks[mask]))
mask++;
@ -4322,9 +4323,15 @@ gst_rtspsrc_setup_streams (GstRTSPSrc * src)
/* create a string with first transport in line */
res = gst_rtspsrc_create_transports_string (src,
protocols & protocol_masks[mask], &transports);
if (res < 0)
if (res < 0 || transports == NULL)
goto setup_transport_failed;
if (strlen (transports) == 0) {
GST_DEBUG_OBJECT (src, "no transports found");
mask++;
goto next_protocol;
}
GST_DEBUG_OBJECT (src, "replace ports in %s", GST_STR_NULL (transports));
/* replace placeholders with real values, this function will optionally