mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
rtsp-stream: Only use the address pool for unicast UDP if it contains unicast addresses
Otherwise we fail to allocate UDP ports if the pool only contains multicast addresses, which is something that used to work before. For unicast addresses if the pool contains none, we just allocate them as if there is no pool at all. https://bugzilla.gnome.org/show_bug.cgi?id=757488
This commit is contained in:
parent
406ed190ac
commit
a7ced98346
1 changed files with 7 additions and 8 deletions
|
@ -1229,16 +1229,15 @@ again:
|
|||
goto no_udp_protocol;
|
||||
}
|
||||
|
||||
if (pool) {
|
||||
GstRTSPAddressFlags flags;
|
||||
if (pool && ((transport == GST_RTSP_LOWER_TRANS_UDP &&
|
||||
gst_rtsp_address_pool_has_unicast_addresses (pool))
|
||||
|| transport == GST_RTSP_LOWER_TRANS_UDP_MCAST)) {
|
||||
GstRTSPAddressFlags flags = GST_RTSP_ADDRESS_FLAG_EVEN_PORT;
|
||||
|
||||
if (transport == GST_RTSP_LOWER_TRANS_UDP &&
|
||||
gst_rtsp_address_pool_has_unicast_addresses (pool))
|
||||
flags = GST_RTSP_ADDRESS_FLAG_EVEN_PORT | GST_RTSP_ADDRESS_FLAG_UNICAST;
|
||||
else if (transport == GST_RTSP_LOWER_TRANS_UDP_MCAST)
|
||||
flags = GST_RTSP_ADDRESS_FLAG_EVEN_PORT | GST_RTSP_ADDRESS_FLAG_MULTICAST;
|
||||
if (transport == GST_RTSP_LOWER_TRANS_UDP)
|
||||
flags |= GST_RTSP_ADDRESS_FLAG_UNICAST;
|
||||
else
|
||||
goto no_ports;
|
||||
flags |= GST_RTSP_ADDRESS_FLAG_MULTICAST;
|
||||
|
||||
if (addr)
|
||||
rejected_addresses = g_list_prepend (rejected_addresses, addr);
|
||||
|
|
Loading…
Reference in a new issue