dvd_reader.c and dvdread_internal.h use a mix of _WIN32 and _MSC_VER for
windows specific code. _WIN32 works for mingw, but _MSC_VER does not.
The practical effect of the incorrectly built code is that the dvd is
not opened as an image and thus the css keys are never obtained and
decryption doesn't happen.
Patch attached.
diff -Naur libdvdread.orig/src/dvd_reader.c libdvdread/src/dvd_reader.c
--- libdvdread.orig/src/dvd_reader.c 2009-03-13 18:28:21.000000000 -0700
+++ libdvdread/src/dvd_reader.c 2009-07-31 16:51:58.564708399 -0700
@@ -335,7 +335,7 @@
char *dev_name = NULL;
char *path;
-#ifdef _MSC_VER
+#ifdef _WIN32
int len;
#endif
@@ -349,7 +349,7 @@
/* Try to open libdvdcss or fall back to standard functions */
have_css = dvdinput_setup();
-#ifdef _MSC_VER
+#ifdef _WIN32
/* Strip off the trailing \ if it is not a drive */
len = strlen(path);
if ((len > 1) &&
@@ -508,11 +508,11 @@
}
fclose( mntfile );
}
-#elif defined(_MSC_VER) || defined(__OS2__)
+#elif defined(_WIN32) || defined(__OS2__)
auth_drive = DVDOpenImageFile( path, have_css );
#endif
-#if !defined(_MSC_VER) && !defined(__OS2__)
+#if !defined(_WIN32) && !defined(__OS2__)
if( !dev_name ) {
fprintf( stderr, "libdvdread: Couldn't find device name.\n" );
} else if( !auth_drive ) {
diff -Naur libdvdread.orig/src/dvdread_internal.h
libdvdread/src/dvdread_internal.h
--- libdvdread.orig/src/dvdread_internal.h 2008-10-03 13:11:30.000000000
-0700
+++ libdvdread/src/dvdread_internal.h 2009-07-31 16:52:14.163725841 -0700
@@ -19,9 +19,9 @@
#ifndef LIBDVDREAD_DVDREAD_INTERNAL_H
#define LIBDVDREAD_DVDREAD_INTERNAL_H
-#ifdef _MSC_VER
+#ifdef _WIN32
#include <unistd.h>
-#endif /* _MSC_VER */
+#endif /* _WIN32 */
#define CHECK_VALUE(arg) \
if(!(arg)) { \
_______________________________________________
DVDnav-discuss mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss