mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
rtsp-stream: Decide based on the sockets, not the addresses if we already allocated a socket
In the multicast case (as in test-multicast, not test-multicast2), the address could be allocated/reserved (and thus set) already without allocating the actual socket. We need to allocate the socket here still instead of just claiming that it was already allocated. See https://bugzilla.gnome.org/show_bug.cgi?id=791743#c2
This commit is contained in:
parent
64f1a3ab85
commit
4d86f99449
1 changed files with 5 additions and 4 deletions
|
@ -1508,18 +1508,19 @@ gst_rtsp_stream_allocate_udp_sockets (GstRTSPStream * stream,
|
|||
g_mutex_lock (&priv->lock);
|
||||
|
||||
if (transport == GST_RTSP_LOWER_TRANS_UDP_MCAST) {
|
||||
if (family == G_SOCKET_FAMILY_IPV4 && priv->mcast_addr_v4)
|
||||
if (family == G_SOCKET_FAMILY_IPV4 && priv->mcast_socket_v4[0])
|
||||
allocated = TRUE;
|
||||
else if (family == G_SOCKET_FAMILY_IPV6 && priv->mcast_addr_v6)
|
||||
else if (family == G_SOCKET_FAMILY_IPV6 && priv->mcast_socket_v6[0])
|
||||
allocated = TRUE;
|
||||
} else if (transport == GST_RTSP_LOWER_TRANS_UDP) {
|
||||
if (family == G_SOCKET_FAMILY_IPV4 && priv->server_addr_v4)
|
||||
if (family == G_SOCKET_FAMILY_IPV4 && priv->socket_v4[0])
|
||||
allocated = TRUE;
|
||||
else if (family == G_SOCKET_FAMILY_IPV6 && priv->server_addr_v6)
|
||||
else if (family == G_SOCKET_FAMILY_IPV6 && priv->socket_v6[0])
|
||||
allocated = TRUE;
|
||||
}
|
||||
|
||||
if (allocated) {
|
||||
GST_DEBUG_OBJECT (stream, "Allocated already");
|
||||
g_mutex_unlock (&priv->lock);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue