From db9d91215d676f9bb7199af91e9e5070ea36eb01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 11 Jul 2006 03:22:59 +0000 Subject: Apply patches for Darwin compatibility, SF.net bug 1431220. Thanks to Benjamin Reed. CVS patchset: 8109 CVS date: 2006/07/11 03:22:59 --- src/input/input_dvd.c | 11 ++++++++--- src/input/libdvdnav/dvd_input.c | 10 ++++++---- 2 files changed, 14 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index eaf60f473..13f88c3d6 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_dvd.c,v 1.208 2006/07/10 22:08:15 dgp85 Exp $ + * $Id: input_dvd.c,v 1.209 2006/07/11 03:22:59 dgp85 Exp $ * */ @@ -1783,8 +1783,13 @@ static void *init_class (xine_t *xine, void *data) { _("The path to the device, usually a " "DVD drive, which you intend to use for playing DVDs."), 10, device_change_cb, (void *)this); - - if ((dvdcss = dlopen("libdvdcss.so.2", RTLD_LAZY)) != NULL) { + +#ifdef HOST_OS_DARWIN + if ((dvdcss = dlopen("libdvdcss.2.dylib", RTLD_LAZY)) != NULL) +#else + if ((dvdcss = dlopen("libdvdcss.so.2", RTLD_LAZY)) != NULL) +#endif + { /* we have found libdvdcss, enable the specific config options */ char *raw_device; static char *decrypt_modes[] = { "key", "disc", "title", NULL }; diff --git a/src/input/libdvdnav/dvd_input.c b/src/input/libdvdnav/dvd_input.c index 6e8dbd8d0..6b7bcaeab 100644 --- a/src/input/libdvdnav/dvd_input.c +++ b/src/input/libdvdnav/dvd_input.c @@ -364,10 +364,12 @@ int dvdinput_setup(void) #else /* dlopening libdvdcss */ -#ifndef WIN32 - dvdcss_library = dlopen("libdvdcss.so.2", RTLD_LAZY); -#else +#ifdef HOST_OS_DARWIN + dvdcss_library = dlopen("libdvdcss.2.dylib", RTLD_LAZY); +#elif defined(WIN32) dvdcss_library = dlopen("libdvdcss.dll", RTLD_LAZY); +#else + dvdcss_library = dlopen("libdvdcss.so.2", RTLD_LAZY); #endif if(dvdcss_library != NULL) { @@ -400,7 +402,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, " + fprintf(stderr, "libdvdread: Missing symbols in libdvdcss, " "this shouldn't happen !\n"); dlclose(dvdcss_library); } -- cgit v1.2.3