]> git.sesse.net Git - vlc/commitdiff
Do not block (non interruptible) in dvdnav on fifo.
authorLaurent Aimar <fenrir@videolan.org>
Sun, 15 Feb 2009 15:30:40 +0000 (16:30 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 15 Feb 2009 15:30:40 +0000 (16:30 +0100)
modules/access/dvdnav.c

index 8a67a835107771eb11e3a4a0052bba3ea832bb6a..8368add49dfece676d6dd26892d0288246f02524 100644 (file)
@@ -1436,7 +1436,7 @@ static int ProbeDVD( demux_t *p_demux, char *psz_name )
         return VLC_SUCCESS;
     }
 
-    if( (i_fd = open( psz_name, O_RDONLY )) == -1 )
+    if( (i_fd = utf8_open( psz_name, O_RDONLY |O_NONBLOCK, 0666 )) == -1 )
     {
         return VLC_SUCCESS; /* Let dvdnav_open() do the probing */
     }
@@ -1444,6 +1444,9 @@ static int ProbeDVD( demux_t *p_demux, char *psz_name )
     if( fstat( i_fd, &stat_info ) || !S_ISREG( stat_info.st_mode ) )
     {
         close( i_fd );
+
+        if( S_ISFIFO( stat_info.st_mode ) )
+            return VLC_EGENERIC;
         return VLC_SUCCESS; /* Let dvdnav_open() do the probing */
     }