Skip to content
Browse files

[libdvd] - added missing patches

  • Loading branch information...
1 parent a894e5e commit 217532dfa495abd883d98b068394fe2452362274 @Memphiz Memphiz committed Apr 21, 2013
View
0 lib/libdvd/patches/libdvdread.diff → lib/libdvd/patches/01-libdvdread.diff
File renamed without changes.
View
87 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
+

0 comments on commit 217532d

Please sign in to comment.
Something went wrong with that request. Please try again.