gst/udp/: Fix "argument type mismatch" compiler warnings on Windows.

Original commit message from CVS:
Patch by: <lrn1986 at gmail dot com>
* 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.
This commit is contained in:
Sebastian Dröge 2008-10-27 08:36:43 +00:00
parent 3ca3d1de2b
commit cbec4b2d9d
4 changed files with 26 additions and 2 deletions

View file

@ -1,3 +1,13 @@
2008-10-27 Sebastian Dröge <sebastian.droege@collabora.co.uk>
Patch by: <lrn1986 at gmail dot com>
* 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.
2008-10-27 Sebastian Dröge <sebastian.droege@collabora.co.uk> 2008-10-27 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* gst/equalizer/gstiirequalizer.c: (update_coefficients): * gst/equalizer/gstiirequalizer.c: (update_coefficients):

View file

@ -243,7 +243,11 @@ gst_dynudpsink_render (GstBaseSink * bsink, GstBuffer * buffer)
theiraddr.sin_family = AF_INET; theiraddr.sin_family = AF_INET;
theiraddr.sin_addr.s_addr = destaddr; theiraddr.sin_addr.s_addr = destaddr;
theiraddr.sin_port = destport; theiraddr.sin_port = destport;
#ifdef G_OS_WIN32
ret = sendto (sink->sock, (char *) data, size, 0,
#else
ret = sendto (sink->sock, data, size, 0, ret = sendto (sink->sock, data, size, 0,
#endif
(struct sockaddr *) &theiraddr, sizeof (theiraddr)); (struct sockaddr *) &theiraddr, sizeof (theiraddr));
if (ret < 0) { if (ret < 0) {

View file

@ -395,9 +395,12 @@ gst_multiudpsink_render (GstBaseSink * bsink, GstBuffer * buffer)
GST_LOG_OBJECT (sink, "sending %d bytes to client %p", size, client); GST_LOG_OBJECT (sink, "sending %d bytes to client %p", size, client);
while (TRUE) { while (TRUE) {
#ifdef G_OS_WIN32
ret = sendto (*client->sock, (char *) data, size, 0,
#else
ret = sendto (*client->sock, data, size, 0, ret = sendto (*client->sock, data, size, 0,
#endif
(struct sockaddr *) &client->theiraddr, sizeof (client->theiraddr)); (struct sockaddr *) &client->theiraddr, sizeof (client->theiraddr));
if (ret < 0) { if (ret < 0) {
/* we get a non-posix EPERM on Linux when a firewall rule blocks this /* we get a non-posix EPERM on Linux when a firewall rule blocks this
* destination. We will simply ignore this. */ * destination. We will simply ignore this. */

View file

@ -458,7 +458,11 @@ no_select:
while (TRUE) { while (TRUE) {
len = sizeof (struct sockaddr); len = sizeof (struct sockaddr);
#ifdef G_OS_WIN32
ret = recvfrom (udpsrc->sock.fd, (char *) pktdata, pktsize,
#else
ret = recvfrom (udpsrc->sock.fd, pktdata, pktsize, ret = recvfrom (udpsrc->sock.fd, pktdata, pktsize,
#endif
0, (struct sockaddr *) &tmpaddr, &len); 0, (struct sockaddr *) &tmpaddr, &len);
if (G_UNLIKELY (ret < 0)) { if (G_UNLIKELY (ret < 0)) {
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
@ -744,8 +748,11 @@ gst_udpsrc_start (GstBaseSrc * bsrc)
GstUDPSrc *src; GstUDPSrc *src;
gint ret; gint ret;
int rcvsize; int rcvsize;
#ifdef G_OS_WIN32
gint len;
#else
guint len; guint len;
#endif
src = GST_UDPSRC (bsrc); src = GST_UDPSRC (bsrc);
if (src->sockfd == -1) { if (src->sockfd == -1) {