Index: gstudpsrc.c
===================================================================
--- gstudpsrc.c	(revision 11106)
+++ gstudpsrc.c	(working copy)
@@ -478,6 +478,12 @@
   /* ask how much is available for reading on the socket, this should be exactly
    * one UDP packet. We will check the return value, though, because in some
    * case it can return 0 and we don't want a 0 sized buffer. */
+
+#ifdef G_OS_WIN32
+/* Jo: removed IOCTL_SOCKET because it caused packet loss 
+ * indeed it seems that the use of this call in Windows is discouraged */
+  readsize = 64*1024;
+#else
   readsize = 0;
   if (G_UNLIKELY ((ret =
               IOCTL_SOCKET (udpsrc->sock.fd, FIONREAD, &readsize)) < 0))
@@ -500,6 +506,7 @@
     /* poll again */
     goto retry;
   }
+#endif
 
 no_select:
   GST_LOG_OBJECT (udpsrc, "ioctl says %d bytes available", (int) readsize);
@@ -517,15 +524,19 @@
 #endif
     if (G_UNLIKELY (ret < 0)) {
 #ifdef G_OS_WIN32
+      long	error = WSAGetLastError ();
+
       /* WSAECONNRESET for a UDP socket means that a packet sent with udpsink
        * generated a "port unreachable" ICMP response. We ignore that and try
        * again. */
-      if (WSAGetLastError () == WSAECONNRESET) {
+      /* Jo: manage also error WSAEWOULDBLOCK (Resource temporarily unavailable)
+       * that sometimes is reased after IOCTL_SOCKET removal at line 489 */
+      if (error == WSAECONNRESET || error == WSAEWOULDBLOCK) {
         g_free (pktdata);
         pktdata = NULL;
         goto retry;
       }
-      if (WSAGetLastError () != WSAEINTR)
+      if (error != WSAEINTR)
         goto receive_error;
 #else
       if (errno != EAGAIN && errno != EINTR)
