comparison libmpdvdkit2/dvd_reader.c @ 12431:663fdd72e594

Encrypted dvd playback now accepts -dvd-drive e: on mingw. fix from libdvdread, left out the various cosmetics changes for now
author faust3
date Thu, 06 May 2004 18:04:06 +0000
parents b9bbfd4a0acc
children 25df9508f9a8
comparison
equal deleted inserted replaced
12430:d82d84b94125 12431:663fdd72e594
271 int ret, have_css; 271 int ret, have_css;
272 char *dev_name = 0; 272 char *dev_name = 0;
273 273
274 if( !path ) return 0; 274 if( !path ) return 0;
275 275
276 #ifdef WIN32
277 /* Stat doesn't work on devices under mingwin/cygwin. */
278 if( path[0] && path[1] == ':' && path[2] == '\0' )
279 {
280 /* Don't try to stat the file */
281 fileinfo.st_mode = S_IFBLK;
282 }
283 else
284 #endif
285 {
276 ret = stat( path, &fileinfo ); 286 ret = stat( path, &fileinfo );
277 if( ret < 0 ) { 287 if( ret < 0 ) {
278 /* If we can't stat the file, give up */ 288 /* If we can't stat the file, give up */
279 fprintf( stderr, "libdvdread: Can't stat %s\n", path ); 289 fprintf( stderr, "libdvdread: Can't stat %s\n", path );
280 perror(""); 290 perror("");
281 return 0; 291 return 0;
292 }
282 } 293 }
283 294
284 /* Try to open libdvdcss or fall back to standard functions */ 295 /* Try to open libdvdcss or fall back to standard functions */
285 have_css = DVDInputSetup(); 296 have_css = DVDInputSetup();
286 297