diff options
author | faust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-05-06 18:04:06 +0000 |
---|---|---|
committer | faust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-05-06 18:04:06 +0000 |
commit | 7e24201e0789de8065e6b66a4572c31b2a848157 (patch) | |
tree | 15dfd3a8189196014a1c9df82eaedd5885a6e2be /libmpdvdkit2 | |
parent | 885ed6c52fe9fd3cd4d115116feac2f60b654560 (diff) |
Encrypted dvd playback now accepts -dvd-drive e: on mingw. fix from libdvdread, left out the various cosmetics changes for now
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12432 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdvdkit2')
-rw-r--r-- | libmpdvdkit2/dvd_reader.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libmpdvdkit2/dvd_reader.c b/libmpdvdkit2/dvd_reader.c index d800ae654c..f33ebb7703 100644 --- a/libmpdvdkit2/dvd_reader.c +++ b/libmpdvdkit2/dvd_reader.c @@ -273,6 +273,16 @@ dvd_reader_t *DVDOpen( const char *path ) if( !path ) return 0; +#ifdef WIN32 + /* Stat doesn't work on devices under mingwin/cygwin. */ + if( path[0] && path[1] == ':' && path[2] == '\0' ) + { + /* Don't try to stat the file */ + fileinfo.st_mode = S_IFBLK; + } + else +#endif + { ret = stat( path, &fileinfo ); if( ret < 0 ) { /* If we can't stat the file, give up */ @@ -280,6 +290,7 @@ dvd_reader_t *DVDOpen( const char *path ) perror(""); return 0; } + } /* Try to open libdvdcss or fall back to standard functions */ have_css = DVDInputSetup(); |