diff options
author | Michael Smith <msmith@xiph.org> | 2008-11-20 22:56:58 +0000 |
---|---|---|
committer | Michael Smith <msmith@xiph.org> | 2008-11-20 22:56:58 +0000 |
commit | 9b372f1bbd3c1e0994811354fe500f1da0ea938b (patch) | |
tree | 234e1d6693faee2fd82deee21245f0937b4319f1 /gst/udp/gstudpsrc.c | |
parent | 380b64d670d1a8a9a5075d3a235f57f10d0f41fa (diff) |
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.
Diffstat (limited to 'gst/udp/gstudpsrc.c')
-rw-r--r-- | gst/udp/gstudpsrc.c | 14 |
1 files changed, 1 insertions, 13 deletions
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; |