[MPlayer-dev-eng] fix dynamic dvd drive selection on darwin

Emanuele Giaquinta e.giaquinta at glauco.it
Sat Nov 19 03:41:10 CET 2005


Forget the previous patch for now; I've found that dvd_reader.c does not
define SYS_BSD on osx, as it should, cause there is no test for
__APPLE__ and __DARWIN__ is not defined on osx.  The attached patch
fixes this.  Now, since the rdisk devices are raw, how can the dynamic
dvd selection ever work?  DVDOpen just calls DVDOpenImageFile in the
SYS_BSD case, which is the right one, and its return value is not a valid
way to check that the device is associated to a dvd drive.  IMO it is
better to revert to the traditional behaviour using rdisk1 as the
default dvd device.
-------------- next part --------------
Index: dvd_reader.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdvdkit2/dvd_reader.c,v
retrieving revision 1.16
diff -u -r1.16 dvd_reader.c
--- dvd_reader.c	17 Sep 2005 20:53:20 -0000	1.16
+++ dvd_reader.c	19 Nov 2005 02:22:20 -0000
@@ -36,7 +36,7 @@
 #include <limits.h>
 #include <dirent.h>
  
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__bsdi__)|| defined(__DARWIN__) || defined(__DragonFly__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__bsdi__) || defined(__DARWIN__) || defined(__DragonFly__) || defined(__APPLE__)
 #define SYS_BSD 1
 #endif
 


More information about the MPlayer-dev-eng mailing list