From 4b608cc1f1bf61c38ad7f69a5f63feb15eb6849e Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 24 Mar 2008 16:31:30 +0000 Subject: [PATCH] plugins/elements/: Also retry our poll_wait when we get EAGAIN. Fixes #524041. 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 | 6 ++++++ plugins/elements/gstfdsink.c | 2 +- plugins/elements/gstfdsrc.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index da5f51f1d5..a613f7f7be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-03-24 Wim Taymans + + * 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 * plugins/elements/gstmultiqueue.c: (single_queue_overrun_cb), diff --git a/plugins/elements/gstfdsink.c b/plugins/elements/gstfdsink.c index 61bd33edd4..14b723b968 100644 --- a/plugins/elements/gstfdsink.c +++ b/plugins/elements/gstfdsink.c @@ -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) diff --git a/plugins/elements/gstfdsrc.c b/plugins/elements/gstfdsrc.c index 2ca1733d18..83f9476220 100644 --- a/plugins/elements/gstfdsrc.c +++ b/plugins/elements/gstfdsrc.c @@ -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)