aboutsummaryrefslogtreecommitdiff
path: root/lib/libdvd
diff options
context:
space:
mode:
authorMemphiz <memphis@machzwo.de>2013-04-21 21:39:32 +0200
committerMemphiz <memphis@machzwo.de>2013-04-21 21:40:00 +0200
commit217532dfa495abd883d98b068394fe2452362274 (patch)
tree4e289dc29207898705bb8eaeed516e3e2833e9c2 /lib/libdvd
parenta894e5e6e8e2e4d3e07750aa68c88264ea8dbe21 (diff)
[libdvd] - added missing patches
Diffstat (limited to 'lib/libdvd')
-rw-r--r--lib/libdvd/patches/01-libdvdread.diff (renamed from lib/libdvd/patches/libdvdread.diff)0
-rw-r--r--lib/libdvd/patches/02-libdvdread_dvd_reader.c.diff87
2 files changed, 87 insertions, 0 deletions
diff --git a/lib/libdvd/patches/libdvdread.diff b/lib/libdvd/patches/01-libdvdread.diff
index fbf185f0dd..fbf185f0dd 100644
--- a/lib/libdvd/patches/libdvdread.diff
+++ b/lib/libdvd/patches/01-libdvdread.diff
diff --git a/lib/libdvd/patches/02-libdvdread_dvd_reader.c.diff b/lib/libdvd/patches/02-libdvdread_dvd_reader.c.diff
new file mode 100644
index 0000000000..a49c0e741f
--- /dev/null
+++ b/lib/libdvd/patches/02-libdvdread_dvd_reader.c.diff
@@ -0,0 +1,87 @@
+From 3708d886958258fcf18fe827eb8ab32ecda45943 Mon Sep 17 00:00:00 2001
+From: Voyager1 <voyager@xbmc.org>
+Date: Wed, 20 Feb 2013 19:47:34 +0100
+Subject: [PATCH 1/3] Fix inability of libdvd 4.2.0 to read DVDs stored as
+ VIDEO_TS files on non-Windows OSs. Fixes
+ http://trac.xbmc.org/ticket/14115.
+
+---
+ lib/libdvd/libdvdread/src/dvd_reader.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/lib/libdvd/libdvdread/src/dvd_reader.c b/lib/libdvd/libdvdread/src/dvd_reader.c
+index d9544b3..2b3562f 100644
+--- a/lib/libdvd/libdvdread/src/dvd_reader.c
++++ b/lib/libdvd/libdvdread/src/dvd_reader.c
+@@ -445,7 +445,11 @@ dvd_reader_t *DVDOpen( const char *ppath )
+ close( cdir );
+ cdir = -1;
+ if( retval == -1 ) {
++#if defined(_XBMC)
++ perror("libdvdread: failed to reset working directory to \".\""); /* but ignore error */
++#else
+ goto DVDOpen_error;
++#endif // _XBMC
+ }
+ path_copy = new_path;
+ new_path = NULL;
+--
+1.7.9.4
+
+From cffa18401f642b35a91de7e5b1e184f1dc0bef6d Mon Sep 17 00:00:00 2001
+From: Voyager1 <voyager@xbmc.org>
+Date: Thu, 21 Feb 2013 20:07:03 +0100
+Subject: [PATCH 2/3] libdvdread: replace perror by fprintf so that it gets
+ picked up in xbmc logs
+
+---
+ lib/libdvd/libdvdread/src/dvd_reader.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/libdvd/libdvdread/src/dvd_reader.c b/lib/libdvd/libdvdread/src/dvd_reader.c
+index 2b3562f..38a3812 100644
+--- a/lib/libdvd/libdvdread/src/dvd_reader.c
++++ b/lib/libdvd/libdvdread/src/dvd_reader.c
+@@ -446,7 +446,7 @@ dvd_reader_t *DVDOpen( const char *ppath )
+ cdir = -1;
+ if( retval == -1 ) {
+ #if defined(_XBMC)
+- perror("libdvdread: failed to reset working directory to \".\""); /* but ignore error */
++ fprintf( stderr, "libdvdread: failed to reset working directory to \".\": %s\n", strerror(errno)); /* but ignore error */
+ #else
+ goto DVDOpen_error;
+ #endif // _XBMC
+--
+1.7.9.4
+
+From cb345a7e3cde07506bf3a2d696fcbb3dff44477d Mon Sep 17 00:00:00 2001
+From: Memphiz <memphis@machzwo.de>
+Date: Sat, 20 Apr 2013 01:04:53 +0200
+Subject: [PATCH 3/3] [dvdread] - don't check the return value of chdir in
+ xbmc - this function is not wrapped and might fail (and
+ so will the whole dvd open in that case). This is non
+ fatal for our vfs!
+
+---
+ lib/libdvd/libdvdread/src/dvd_reader.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/lib/libdvd/libdvdread/src/dvd_reader.c b/lib/libdvd/libdvdread/src/dvd_reader.c
+index 38a3812..d7ff12e 100644
+--- a/lib/libdvd/libdvdread/src/dvd_reader.c
++++ b/lib/libdvd/libdvdread/src/dvd_reader.c
+@@ -432,7 +432,11 @@ dvd_reader_t *DVDOpen( const char *ppath )
+ {
+ if( ( cdir = open( ".", O_RDONLY ) ) >= 0 ) {
+ if( chdir( path_copy ) == -1 ) {
++#if defined(_XBMC)
++ fprintf( stderr, "libdvdread: failed to change working directory to \"%s\": %s\n", path_copy, strerror(errno)); /* but ignore error */
++#else
+ goto DVDOpen_error;
++#endif // _XBMC
+ }
+ new_path = malloc(PATH_MAX+1);
+ if(!new_path) {
+--
+1.7.9.4
+