mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
rtspsrc: select multicast transports in a smarter way
When we see a multicast address in the SDP connection, only try to negotiate a multicast transport with the server. Fixes #634093
This commit is contained in:
parent
cad6e95c04
commit
7ed250c793
2 changed files with 11 additions and 1 deletions
|
@ -915,9 +915,14 @@ gst_rtspsrc_do_stream_connection (GstRTSPSrc * src, GstRTSPStream * stream,
|
|||
else
|
||||
return;
|
||||
|
||||
/* save address, FIXME, check for multicast */
|
||||
/* save address */
|
||||
g_free (stream->destination);
|
||||
stream->destination = g_strdup (conn->address);
|
||||
|
||||
/* check for multicast */
|
||||
stream->is_multicast =
|
||||
gst_sdp_address_is_multicast (conn->nettype, conn->addrtype,
|
||||
conn->address);
|
||||
stream->ttl = conn->ttl;
|
||||
}
|
||||
|
||||
|
@ -4849,6 +4854,10 @@ gst_rtspsrc_setup_streams (GstRTSPSrc * src)
|
|||
GST_DEBUG_OBJECT (src, "doing setup of stream %p with %s", stream,
|
||||
stream->conninfo.location);
|
||||
|
||||
/* if we have a multicast connection, only suggest multicast from now on */
|
||||
if (stream->is_multicast)
|
||||
protocols &= GST_RTSP_LOWER_TRANS_UDP_MCAST;
|
||||
|
||||
next_protocol:
|
||||
/* first selectable protocol */
|
||||
while (protocol_masks[mask] && !(protocols & protocol_masks[mask]))
|
||||
|
|
|
@ -145,6 +145,7 @@ struct _GstRTSPStream {
|
|||
|
||||
/* destination */
|
||||
gchar *destination;
|
||||
gboolean is_multicast;
|
||||
guint ttl;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue