summaryrefslogtreecommitdiffstats
path: root/gst/udp/gstudpsrc.c
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2008-04-25 13:31:48 +0000
committerTim-Philipp Müller <tim@centricular.net>2008-04-25 13:31:48 +0000
commit327741a21a1b1fcadc37e3aa1f294b12d8ba8f30 (patch)
tree86cf2cb7c9fd877bcc40ff7c85ac5d188bb2ac86 /gst/udp/gstudpsrc.c
parent883d93df58691c941822e2ca9077a7c23fb74492 (diff)
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).
Diffstat (limited to 'gst/udp/gstudpsrc.c')
-rw-r--r--gst/udp/gstudpsrc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gst/udp/gstudpsrc.c b/gst/udp/gstudpsrc.c
index 53277687..2c0802a3 100644
--- a/gst/udp/gstudpsrc.c
+++ b/gst/udp/gstudpsrc.c
@@ -691,7 +691,7 @@ gst_udpsrc_start (GstBaseSrc * bsrc)
memset (&src->myaddr, 0, sizeof (src->myaddr));
src->myaddr.sin_family = AF_INET; /* host byte order */
- src->myaddr.sin_port = htons (src->port); /* short, network byte order */
+ src->myaddr.sin_port = g_htons (src->port); /* short, network byte order */
if (src->multi_addr.imr_multiaddr.s_addr)
src->myaddr.sin_addr.s_addr = src->multi_addr.imr_multiaddr.s_addr;
@@ -751,7 +751,7 @@ gst_udpsrc_start (GstBaseSrc * bsrc)
sizeof (bc_val))) < 0)
goto no_broadcast;
- port = ntohs (my_addr.sin_port);
+ port = g_ntohs (my_addr.sin_port);
GST_DEBUG_OBJECT (src, "bound, on port %d", port);
if (port != src->port) {
src->port = port;
@@ -759,7 +759,7 @@ gst_udpsrc_start (GstBaseSrc * bsrc)
g_object_notify (G_OBJECT (src), "port");
}
- src->myaddr.sin_port = htons (src->port + 1);
+ src->myaddr.sin_port = g_htons (src->port + 1);
if ((src->fdset = gst_poll_new (TRUE)) == NULL)
goto no_fdset;