[vlc-commits] OSS access: don't choke on EINTR

Rémi Denis-Courmont git at videolan.org
Sun Jan 23 16:49:20 CET 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jan 23 17:36:15 2011 +0200| [0169865b68c30b1505beae2489f8f08e9619a337] | committer: Rémi Denis-Courmont

OSS access: don't choke on EINTR

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0169865b68c30b1505beae2489f8f08e9619a337
---

 modules/access/oss.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/modules/access/oss.c b/modules/access/oss.c
index c400b5a..69f403a 100644
--- a/modules/access/oss.c
+++ b/modules/access/oss.c
@@ -38,6 +38,7 @@
 #include <vlc_demux.h>
 #include <vlc_fs.h>
 
+#include <errno.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <sys/ioctl.h>
@@ -272,6 +273,8 @@ static int Demux( demux_t *p_demux )
         /* Wait for data */
         if( poll( &fd, 1, 10 ) ) /* Timeout after 0.01 seconds. Bigger delays are an issue when used with/as an input-slave since all the inputs run in the same thread. */
         {
+            if( errno == EINTR )
+                continue;
             if( fd.revents & (POLLIN|POLLPRI) )
             {
                 p_block = GrabAudio( p_demux );



More information about the vlc-commits mailing list