From 9b372f1bbd3c1e0994811354fe500f1da0ea938b Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Thu, 20 Nov 2008 22:56:58 +0000 Subject: gst/udp/: Fix multiudpsink on OSX by passing the specific length of the socket, refactor that into a function shared ... Original commit message from CVS: * gst/udp/gstmultiudpsink.c: * gst/udp/gstudpnetutils.c: * gst/udp/gstudpnetutils.h: * gst/udp/gstudpsrc.c: Fix multiudpsink on OSX by passing the specific length of the socket, refactor that into a function shared with the same thing in udpsrc. --- gst/udp/gstmultiudpsink.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gst/udp/gstmultiudpsink.c') diff --git a/gst/udp/gstmultiudpsink.c b/gst/udp/gstmultiudpsink.c index d43f1ff9..95d15ab3 100644 --- a/gst/udp/gstmultiudpsink.c +++ b/gst/udp/gstmultiudpsink.c @@ -374,6 +374,7 @@ gst_multiudpsink_render (GstBaseSink * bsink, GstBuffer * buffer) gint ret, size, num = 0; guint8 *data; GList *clients; + gint len; sink = GST_MULTIUDPSINK (bsink); @@ -395,12 +396,13 @@ gst_multiudpsink_render (GstBaseSink * bsink, GstBuffer * buffer) GST_LOG_OBJECT (sink, "sending %d bytes to client %p", size, client); while (TRUE) { + len = gst_udp_get_sockaddr_length (&client->theiraddr); #ifdef G_OS_WIN32 ret = sendto (*client->sock, (char *) data, size, 0, #else ret = sendto (*client->sock, data, size, 0, #endif - (struct sockaddr *) &client->theiraddr, sizeof (client->theiraddr)); + (struct sockaddr *) &client->theiraddr, len); if (ret < 0) { /* we get a non-posix EPERM on Linux when a firewall rule blocks this * destination. We will simply ignore this. */ -- cgit