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
This commit is contained in:
faust3 2004-05-06 18:04:06 +00:00
parent 885ed6c52f
commit 7e24201e07
1 changed files with 11 additions and 0 deletions

View File

@ -273,6 +273,16 @@ dvd_reader_t *DVDOpen( const char *path )
if( !path ) return 0; 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 ); ret = stat( path, &fileinfo );
if( ret < 0 ) { if( ret < 0 ) {
/* If we can't stat the file, give up */ /* If we can't stat the file, give up */
@ -280,6 +290,7 @@ dvd_reader_t *DVDOpen( const char *path )
perror(""); perror("");
return 0; return 0;
} }
}
/* Try to open libdvdcss or fall back to standard functions */ /* Try to open libdvdcss or fall back to standard functions */
have_css = DVDInputSetup(); have_css = DVDInputSetup();