]> git.sesse.net Git - vlc/blobdiff - modules/access/oss.c
Remove useless parameters
[vlc] / modules / access / oss.c
index 17ee9d5c9f1c829ac20af0614c2417d9188beb79..69f403ac757773591eff2c10a90a2f3a2a8adde1 100644 (file)
@@ -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 );
@@ -304,7 +307,7 @@ static block_t* GrabAudio( demux_t *p_demux )
     if( !p_block )
     {
         msg_Warn( p_demux, "cannot get block" );
-        return 0;
+        return NULL;
     }
 
     p_sys->p_block = p_block;
@@ -312,10 +315,10 @@ static block_t* GrabAudio( demux_t *p_demux )
     i_read = read( p_sys->i_fd, p_block->p_buffer,
                 p_sys->i_max_frame_size );
 
-    if( i_read <= 0 ) return 0;
+    if( i_read <= 0 ) return NULL;
 
     p_block->i_buffer = i_read;
-    p_sys->p_block = 0;
+    p_sys->p_block = NULL;
 
     /* Correct the date because of kernel buffering */
     i_correct = i_read;