mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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:
parent
6a44d8e198
commit
b8c2ccce4e
1 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue