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/gstudpsrc.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'gst/udp/gstudpsrc.c') diff --git a/gst/udp/gstudpsrc.c b/gst/udp/gstudpsrc.c index 1139995f..b16a0521 100644 --- a/gst/udp/gstudpsrc.c +++ b/gst/udp/gstudpsrc.c @@ -777,19 +777,7 @@ gst_udpsrc_start (GstBaseSrc * bsrc) GST_DEBUG_OBJECT (src, "binding on port %d", src->port); - /* Mac OS is picky about the size for the bind so we switch on the family */ - switch (src->myaddr.ss_family) { - case AF_INET: - len = sizeof (struct sockaddr_in); - break; - case AF_INET6: - len = sizeof (struct sockaddr_in6); - break; - default: - /* don't know, Screw MacOS and use the full length */ - len = sizeof (src->myaddr); - break; - } + len = gst_udp_get_sockaddr_length (&src->myaddr); if ((ret = bind (src->sock.fd, (struct sockaddr *) &src->myaddr, len)) < 0) goto bind_error; -- cgit