summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2016-04-11 10:55:23 +0300
committerSebastian Dröge <sebastian@centricular.com>2016-04-29 11:48:57 +0300
commitaa9a2443a1d303727167b5b253e09e31fea6f09b (patch)
tree6027ef3d15ed6041e6a14cddb5f50b30182b89c5
parent99e6d9c6ccbc07f486a492a0babe5ae6210f3977 (diff)
rtsp-stream: Always bind to ANY when address is a multicast address and not only on Windows
For IPv6 addresses, binding to a multicast group does not work on Linux either. Always bind to ANY and then later join the multicast group. https://bugzilla.gnome.org/show_bug.cgi?id=764679
-rw-r--r--gst/rtsp-server/rtsp-stream.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/gst/rtsp-server/rtsp-stream.c b/gst/rtsp-server/rtsp-stream.c
index a847935..810ee1c 100644
--- a/gst/rtsp-server/rtsp-stream.c
+++ b/gst/rtsp-server/rtsp-stream.c
@@ -1342,21 +1342,13 @@ again:
g_clear_object (&inetaddr);
inetaddr = g_inet_address_new_from_string (addr->address);
- /* On Windows it's not possible to bind to a multicast address
- * but the OS will make sure to filter out all packets that
- * arrive not for the multicast address the socket joined.
- *
- * On Linux and others it is necessary to bind to a multicast
- * address to let the OS filter out all packets that are received
- * on the same port but for different addresses than the multicast
- * address
+ /* If we're supposed to bind to a multicast address, instead bind
+ * to ANY and let udpsrc later join the relevant multicast group
*/
-#ifdef G_OS_WIN32
if (g_inet_address_get_is_multicast (inetaddr)) {
g_object_unref (inetaddr);
inetaddr = g_inet_address_new_any (family);
}
-#endif
} else {
if (tmp_rtp != 0) {
tmp_rtp += 2;