[DVDnav-discuss] r921 - trunk/libdvdnav2/src/dvdread/dvd_input.c

nicodvb subversion at mplayerhq.hu
Sun Apr 29 13:44:46 CEST 2007


Author: nicodvb
Date: Sun Apr 29 13:44:46 2007
New Revision: 921

Log:
support for dvdcss in Darwin; patch by Diego Petteno' and Reimar

Modified:
   trunk/libdvdnav2/src/dvdread/dvd_input.c

Modified: trunk/libdvdnav2/src/dvdread/dvd_input.c
==============================================================================
--- trunk/libdvdnav2/src/dvdread/dvd_input.c	(original)
+++ trunk/libdvdnav2/src/dvdread/dvd_input.c	Sun Apr 29 13:44:46 2007
@@ -287,11 +287,14 @@ int dvdinput_setup(void)
 #else
   /* dlopening libdvdcss */
 
-#ifndef WIN32
-  dvdcss_library = dlopen("libdvdcss.so.2", RTLD_LAZY);
+#ifdef __APPLE__
+  #define CSS_LIB "libdvdcss.2.dylib"
+#elif defined(WIN32)
+  #define CSS_LIB "libdvdcss.dll"
 #else
-  dvdcss_library = dlopen("libdvdcss.dll", RTLD_LAZY);
+  #define CSS_LIB "libdvdcss.so.2"
 #endif
+  dvdcss_library = dlopen(CSS_LIB, RTLD_LAZY);
 
   if(dvdcss_library != NULL) {
 #if defined(__OpenBSD__) && !defined(__ELF__)
@@ -323,8 +326,7 @@ int dvdinput_setup(void)
       dvdcss_library = NULL;
     } else if(!DVDcss_open  || !DVDcss_close || !DVDcss_title || !DVDcss_seek
 	      || !DVDcss_read || !DVDcss_error || !dvdcss_version) {
-      fprintf(stderr,  "libdvdread: Missing symbols in libdvdcss.so.2, "
-	      "this shouldn't happen !\n");
+      fprintf(stderr,  "libdvdread: Missing symbols in " CSS_LIB ", this shouldn't happen !\n");
       dlclose(dvdcss_library);
     }
   }



More information about the DVDnav-discuss mailing list