diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2016-03-02 11:47:47 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-03-02 11:47:47 +0200 |
commit | bcee3202d3a6c8749d9a0c7158096d7009f8e337 (patch) | |
tree | f5cae6f6cbb878bb074b65ff70f64e58d3b830d4 | |
parent | ca1d987a9ded0ec7530b0bafd877520e6b3d0640 (diff) |
rtsp-stream: Don't bind the sockets to multicast addresses
This works on Linux but fails completely on Windows. You're supposed
to bind to ANY and then join the multicast group.
https://bugzilla.gnome.org/show_bug.cgi?id=757488
-rw-r--r-- | gst/rtsp-server/rtsp-stream.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gst/rtsp-server/rtsp-stream.c b/gst/rtsp-server/rtsp-stream.c index cf2c88f..8cbedc3 100644 --- a/gst/rtsp-server/rtsp-stream.c +++ b/gst/rtsp-server/rtsp-stream.c @@ -1261,6 +1261,15 @@ again: g_clear_object (&inetaddr); inetaddr = g_inet_address_new_from_string (addr->address); + + /* Don't bind to multicast addresses, this does not work on + * Windows. You're supposed to bind to ANY and then join the + * multicast group, which udpsrc/sink does for us already. + */ + if (g_inet_address_get_is_multicast (inetaddr)) { + g_object_unref (inetaddr); + inetaddr = g_inet_address_new_any (family); + } } else { if (tmp_rtp != 0) { tmp_rtp += 2; |