From cbec4b2d9dbad5fb67e95b16db6a960b7860c239 Mon Sep 17 00:00:00 2001 From: Sebastian Dröge Date: Mon, 27 Oct 2008 08:36:43 +0000 Subject: gst/udp/: Fix "argument type mismatch" compiler warnings on Windows. Original commit message from CVS: Patch by: * gst/udp/gstdynudpsink.c: (gst_dynudpsink_render): * gst/udp/gstmultiudpsink.c: (gst_multiudpsink_render): * gst/udp/gstudpsrc.c: (gst_udpsrc_create): Fix "argument type mismatch" compiler warnings on Windows. Fixes bug #557293. --- gst/udp/gstdynudpsink.c | 4 ++++ gst/udp/gstmultiudpsink.c | 5 ++++- gst/udp/gstudpsrc.c | 9 ++++++++- 3 files changed, 16 insertions(+), 2 deletions(-) (limited to 'gst/udp') diff --git a/gst/udp/gstdynudpsink.c b/gst/udp/gstdynudpsink.c index f9b3eb8e..abdbc718 100644 --- a/gst/udp/gstdynudpsink.c +++ b/gst/udp/gstdynudpsink.c @@ -243,7 +243,11 @@ gst_dynudpsink_render (GstBaseSink * bsink, GstBuffer * buffer) theiraddr.sin_family = AF_INET; theiraddr.sin_addr.s_addr = destaddr; theiraddr.sin_port = destport; +#ifdef G_OS_WIN32 + ret = sendto (sink->sock, (char *) data, size, 0, +#else ret = sendto (sink->sock, data, size, 0, +#endif (struct sockaddr *) &theiraddr, sizeof (theiraddr)); if (ret < 0) { diff --git a/gst/udp/gstmultiudpsink.c b/gst/udp/gstmultiudpsink.c index 2044c83b..d43f1ff9 100644 --- a/gst/udp/gstmultiudpsink.c +++ b/gst/udp/gstmultiudpsink.c @@ -395,9 +395,12 @@ gst_multiudpsink_render (GstBaseSink * bsink, GstBuffer * buffer) GST_LOG_OBJECT (sink, "sending %d bytes to client %p", size, client); while (TRUE) { +#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)); - if (ret < 0) { /* we get a non-posix EPERM on Linux when a firewall rule blocks this * destination. We will simply ignore this. */ diff --git a/gst/udp/gstudpsrc.c b/gst/udp/gstudpsrc.c index b15ed6ec..1139995f 100644 --- a/gst/udp/gstudpsrc.c +++ b/gst/udp/gstudpsrc.c @@ -458,7 +458,11 @@ no_select: while (TRUE) { len = sizeof (struct sockaddr); +#ifdef G_OS_WIN32 + ret = recvfrom (udpsrc->sock.fd, (char *) pktdata, pktsize, +#else ret = recvfrom (udpsrc->sock.fd, pktdata, pktsize, +#endif 0, (struct sockaddr *) &tmpaddr, &len); if (G_UNLIKELY (ret < 0)) { #ifdef G_OS_WIN32 @@ -744,8 +748,11 @@ gst_udpsrc_start (GstBaseSrc * bsrc) GstUDPSrc *src; gint ret; int rcvsize; +#ifdef G_OS_WIN32 + gint len; +#else guint len; - +#endif src = GST_UDPSRC (bsrc); if (src->sockfd == -1) { -- cgit