[vlc-devel] commit: Do not block (non interruptible) in dvdnav on fifo. (Laurent Aimar )
git version control
git at videolan.org
Sun Feb 15 16:31:34 CET 2009
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Feb 15 16:30:40 2009 +0100| [400c04b9705306f597526fc9fc2cfd839e105055] | committer: Laurent Aimar
Do not block (non interruptible) in dvdnav on fifo.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=400c04b9705306f597526fc9fc2cfd839e105055
---
modules/access/dvdnav.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
index 8a67a83..8368add 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -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 */
}
More information about the vlc-devel
mailing list