diff -aru vlc-1.1.0.orig/src/network/io.c vlc-1.1/src/network/io.c
--- vlc-1.1.0.orig/src/network/io.c	2010-06-21 21:19:39.000000000 +0200
+++ vlc-1.1.0/src/network/io.c	2010-06-22 19:42:32.124205671 +0200
@@ -263,6 +263,10 @@
         { .fd = vlc_object_waitpipe (p_this), .events = POLLIN },
     };
 
+    int timeout = var_InheritInteger (p_this, "ipv4-timeout");
+    if (timeout < 0)
+        timeout = -1;
+
     if (ufd[1].fd == -1)
         return -1; /* vlc_object_waitpipe() sets errno */
 
@@ -270,11 +274,17 @@
     {
         ufd[0].revents = ufd[1].revents = 0;
 
-        if (poll (ufd, sizeof (ufd) / sizeof (ufd[0]), -1) < 0)
+        switch (poll (ufd, sizeof (ufd) / sizeof (ufd[0]), timeout))
         {
-            if (errno != EINTR)
+            case -1: /* error */
+                if (errno != EINTR)
+                    goto error;
+                msg_Err (p_this, "Polling error: %m");
+                continue;
+
+            case 0: /* timeout */
+                msg_Warn (p_this, "read timed out");
                 goto error;
-            continue;
         }
 
 #ifndef POLLRDHUP /* This is nice but non-portable */
@@ -402,6 +412,10 @@
         { .fd = vlc_object_waitpipe (p_this), .events = POLLIN  },
     };
 
+    int timeout = var_InheritInteger (p_this, "ipv4-timeout");
+    if (timeout < 0)
+        timeout = -1;
+
     if (unlikely(ufd[1].fd == -1))
     {
         vlc_testcancel ();
@@ -414,12 +428,17 @@
 
         ufd[0].revents = ufd[1].revents = 0;
 
-        if (poll (ufd, sizeof (ufd) / sizeof (ufd[0]), -1) == -1)
+        switch (poll (ufd, sizeof (ufd) / sizeof (ufd[0]), timeout))
         {
-            if (errno == EINTR)
-                continue;
-            msg_Err (p_this, "Polling error: %m");
-            return -1;
+            case -1: /* error */
+                if (errno == EINTR)
+                    continue;
+                msg_Err (p_this, "Polling error: %m");
+                goto error;
+
+            case 0: /* timeout */
+                msg_Warn (p_this, "read timed out");
+                goto error;
         }
 
         if (i_total > 0)
