[Bug 776030] udpsrc: Add to join multiple multicast interfaces
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Tue Dec 13 09:21:56 UTC 2016
https://bugzilla.gnome.org/show_bug.cgi?id=776030
Sebastian Dröge (slomo) <slomo at coaxion.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #341858|none |needs-work
status| |
--- Comment #2 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 341858:
--> (https://bugzilla.gnome.org/review?bug=776030&attachment=341858)
::: gst/udp/gstudpsrc.c
@@ +1438,3 @@
+ n_ifaces = g_strv_length (ifaces);
+
+ for (i = 0; i < n_ifaces; i++) {
Instead of that, just
> p = ifaces;
> while (*p) {
> ...
> p++;
> }
No need to go over the array twice
@@ +1440,3 @@
+ for (i = 0; i < n_ifaces; i++) {
+ GST_DEBUG_OBJECT (src, "joining multicast group %s to interface %s",
+ src->address, ifaces[i]);
You probably want to g_strstrip() the iface to allow "eth0, eth1" (note the
space)
@@ +1443,3 @@
+ if (!g_socket_join_multicast_group (src->used_socket,
+ g_inet_socket_address_get_address (src->addr),
+ FALSE, ifaces[i], &err))
Same is also needed for leaving the multicast group again. And you probably
want to add exactly the same code to multiudpsink too
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list