mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
rtspsrc: handle servers that send broken Transports
Handle servers that send their port pairs with the wrong name. Fixes #617537
This commit is contained in:
parent
ef4d2901aa
commit
05352d7ea8
1 changed files with 19 additions and 0 deletions
|
@ -2398,6 +2398,20 @@ gst_rtspsrc_stream_configure_mcast (GstRTSPSrc * src, GstRTSPStream * stream,
|
||||||
|
|
||||||
min = transport->port.min;
|
min = transport->port.min;
|
||||||
max = transport->port.max;
|
max = transport->port.max;
|
||||||
|
/* some bad servers use the server_port attribute for multicast, try to handle
|
||||||
|
* those cases too here */
|
||||||
|
if (min == -1 && max == -1) {
|
||||||
|
GST_DEBUG_OBJECT (src, "no port attribute set, fallback to server_port");
|
||||||
|
min = transport->server_port.min;
|
||||||
|
max = transport->server_port.max;
|
||||||
|
}
|
||||||
|
|
||||||
|
GST_DEBUG_OBJECT (src, "have destination '%s' and ports (%d)-(%d)",
|
||||||
|
destination, min, max);
|
||||||
|
|
||||||
|
/* we really need ports now or we won't be able to receive anything at all */
|
||||||
|
if (min == -1 && max == -1)
|
||||||
|
goto no_ports;
|
||||||
|
|
||||||
/* creating UDP source for RTP */
|
/* creating UDP source for RTP */
|
||||||
if (min != -1) {
|
if (min != -1) {
|
||||||
|
@ -2442,6 +2456,11 @@ no_destination:
|
||||||
GST_DEBUG_OBJECT (src, "no destination found");
|
GST_DEBUG_OBJECT (src, "no destination found");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
no_ports:
|
||||||
|
{
|
||||||
|
GST_DEBUG_OBJECT (src, "no ports found");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* configure the remainder of the UDP ports */
|
/* configure the remainder of the UDP ports */
|
||||||
|
|
Loading…
Reference in a new issue