From 327741a21a1b1fcadc37e3aa1f294b12d8ba8f30 Mon Sep 17 00:00:00 2001 From: Tim-Philipp Müller Date: Fri, 25 Apr 2008 13:31:48 +0000 Subject: gst/: Use GLib versions of htonl, htons, ntohl and ntohs in order to avoid problems on win32 (#529707). Original commit message from CVS: * gst/rtp/gstasteriskh263.c: (gst_asteriskh263_chain): * gst/udp/gstmultiudpsink.c: (gst_multiudpsink_add_internal): * gst/udp/gstudpsrc.c: (gst_udpsrc_start): Use GLib versions of htonl, htons, ntohl and ntohs in order to avoid problems on win32 (#529707). --- gst/udp/gstmultiudpsink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gst/udp/gstmultiudpsink.c') diff --git a/gst/udp/gstmultiudpsink.c b/gst/udp/gstmultiudpsink.c index 1ec8f63a..6c23874a 100644 --- a/gst/udp/gstmultiudpsink.c +++ b/gst/udp/gstmultiudpsink.c @@ -626,7 +626,7 @@ gst_multiudpsink_add_internal (GstMultiUDPSink * sink, const gchar * host, memset (&client->theiraddr, 0, sizeof (client->theiraddr)); memset (&client->multi_addr, 0, sizeof (client->multi_addr)); client->theiraddr.sin_family = AF_INET; /* host byte order */ - client->theiraddr.sin_port = htons (port); /* short, network byte order */ + client->theiraddr.sin_port = g_htons (port); /* short, network byte order */ g_get_current_time (&now); client->connect_time = GST_TIMEVAL_TO_TIME (now); @@ -634,7 +634,7 @@ gst_multiudpsink_add_internal (GstMultiUDPSink * sink, const gchar * host, /* if its an IP address */ if (inet_aton (host, &addr)) { /* check if its a multicast address */ - if ((ntohl (addr.s_addr) & 0xf0000000) == 0xe0000000) { + if ((g_ntohl (addr.s_addr) & 0xf0000000) == 0xe0000000) { GST_DEBUG_OBJECT (sink, "multicast address detected"); client->multi_addr.imr_multiaddr.s_addr = addr.s_addr; client->multi_addr.imr_interface.s_addr = INADDR_ANY; -- cgit