plugins/elements/: Also retry our poll_wait when we get EAGAIN. Fixes #524041.
authorWim Taymans <wim.taymans@gmail.com>
Mon, 24 Mar 2008 16:31:30 +0000 (16:31 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Mon, 24 Mar 2008 16:31:30 +0000 (16:31 +0000)
Original commit message from CVS:
* plugins/elements/gstfdsink.c: (gst_fd_sink_render):
* plugins/elements/gstfdsrc.c: (gst_fd_src_create):
Also retry our poll_wait when we get EAGAIN. Fixes #524041.

ChangeLog
plugins/elements/gstfdsink.c
plugins/elements/gstfdsrc.c

index da5f51f..a613f7f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2008-03-24  Wim Taymans  <wim.taymans@collabora.co.uk>
 
+       * plugins/elements/gstfdsink.c: (gst_fd_sink_render):
+       * plugins/elements/gstfdsrc.c: (gst_fd_src_create):
+       Also retry our poll_wait when we get EAGAIN. Fixes #524041.
+
+2008-03-24  Wim Taymans  <wim.taymans@collabora.co.uk>
+
        * plugins/elements/gstmultiqueue.c: (single_queue_overrun_cb),
        (single_queue_underrun_cb):
        When trying to make room in the queue, bump the max allowed buffers
index 61bd33e..14b723b 100644 (file)
@@ -233,7 +233,7 @@ again:
     GST_DEBUG_OBJECT (fdsink, "going into select, have %d bytes to write",
         size);
     retval = gst_poll_wait (fdsink->fdset, GST_CLOCK_TIME_NONE);
-  } while (retval == -1 && errno == EINTR);
+  } while (retval == -1 && (errno == EINTR || errno == EAGAIN));
 
   if (retval == -1) {
     if (errno == EBUSY)
index 2ca1733..83f9476 100644 (file)
@@ -342,7 +342,7 @@ gst_fd_src_create (GstPushSrc * psrc, GstBuffer ** outbuf)
 #ifndef HAVE_WIN32
   do {
     retval = gst_poll_wait (src->fdset, GST_CLOCK_TIME_NONE);
-  } while (retval == -1 && errno == EINTR);
+  } while (retval == -1 && (errno == EINTR || errno == EAGAIN));        /* retry if interrupted */
 
   if (retval == -1) {
     if (errno == EBUSY)