Skip to content
This repository
Browse code

[libdvd] - added missing patches

  • Loading branch information...
commit 217532dfa495abd883d98b068394fe2452362274 1 parent a894e5e
Memphiz authored April 21, 2013
0  lib/libdvd/patches/libdvdread.diff → lib/libdvd/patches/01-libdvdread.diff
File renamed without changes
87  lib/libdvd/patches/02-libdvdread_dvd_reader.c.diff
... ...
@@ -0,0 +1,87 @@
  1
+From 3708d886958258fcf18fe827eb8ab32ecda45943 Mon Sep 17 00:00:00 2001
  2
+From: Voyager1 <voyager@xbmc.org>
  3
+Date: Wed, 20 Feb 2013 19:47:34 +0100
  4
+Subject: [PATCH 1/3] Fix inability of libdvd 4.2.0 to read DVDs stored as
  5
+ VIDEO_TS files on non-Windows OSs. Fixes
  6
+ http://trac.xbmc.org/ticket/14115.
  7
+
  8
+---
  9
+ lib/libdvd/libdvdread/src/dvd_reader.c |    4 ++++
  10
+ 1 file changed, 4 insertions(+)
  11
+
  12
+diff --git a/lib/libdvd/libdvdread/src/dvd_reader.c b/lib/libdvd/libdvdread/src/dvd_reader.c
  13
+index d9544b3..2b3562f 100644
  14
+--- a/lib/libdvd/libdvdread/src/dvd_reader.c
  15
++++ b/lib/libdvd/libdvdread/src/dvd_reader.c
  16
+@@ -445,7 +445,11 @@ dvd_reader_t *DVDOpen( const char *ppath )
  17
+ 		close( cdir );
  18
+         cdir = -1;
  19
+         if( retval == -1 ) {
  20
++#if defined(_XBMC)
  21
++          perror("libdvdread: failed to reset working directory to \".\""); /* but ignore error */
  22
++#else
  23
+           goto DVDOpen_error;
  24
++#endif // _XBMC
  25
+         }
  26
+ 		    path_copy = new_path;
  27
+         new_path = NULL;
  28
+-- 
  29
+1.7.9.4
  30
+
  31
+From cffa18401f642b35a91de7e5b1e184f1dc0bef6d Mon Sep 17 00:00:00 2001
  32
+From: Voyager1 <voyager@xbmc.org>
  33
+Date: Thu, 21 Feb 2013 20:07:03 +0100
  34
+Subject: [PATCH 2/3] libdvdread: replace perror by fprintf so that it gets
  35
+ picked up in xbmc logs
  36
+
  37
+---
  38
+ lib/libdvd/libdvdread/src/dvd_reader.c |    2 +-
  39
+ 1 file changed, 1 insertion(+), 1 deletion(-)
  40
+
  41
+diff --git a/lib/libdvd/libdvdread/src/dvd_reader.c b/lib/libdvd/libdvdread/src/dvd_reader.c
  42
+index 2b3562f..38a3812 100644
  43
+--- a/lib/libdvd/libdvdread/src/dvd_reader.c
  44
++++ b/lib/libdvd/libdvdread/src/dvd_reader.c
  45
+@@ -446,7 +446,7 @@ dvd_reader_t *DVDOpen( const char *ppath )
  46
+         cdir = -1;
  47
+         if( retval == -1 ) {
  48
+ #if defined(_XBMC)
  49
+-          perror("libdvdread: failed to reset working directory to \".\""); /* but ignore error */
  50
++          fprintf( stderr, "libdvdread: failed to reset working directory to \".\": %s\n", strerror(errno)); /* but ignore error */
  51
+ #else
  52
+           goto DVDOpen_error;
  53
+ #endif // _XBMC
  54
+-- 
  55
+1.7.9.4
  56
+
  57
+From cb345a7e3cde07506bf3a2d696fcbb3dff44477d Mon Sep 17 00:00:00 2001
  58
+From: Memphiz <memphis@machzwo.de>
  59
+Date: Sat, 20 Apr 2013 01:04:53 +0200
  60
+Subject: [PATCH 3/3] [dvdread] - don't check the return value of chdir in
  61
+ xbmc - this function is not wrapped and might fail (and
  62
+ so will the whole dvd open in that case). This is non
  63
+ fatal for our vfs!
  64
+
  65
+---
  66
+ lib/libdvd/libdvdread/src/dvd_reader.c |    4 ++++
  67
+ 1 file changed, 4 insertions(+)
  68
+
  69
+diff --git a/lib/libdvd/libdvdread/src/dvd_reader.c b/lib/libdvd/libdvdread/src/dvd_reader.c
  70
+index 38a3812..d7ff12e 100644
  71
+--- a/lib/libdvd/libdvdread/src/dvd_reader.c
  72
++++ b/lib/libdvd/libdvdread/src/dvd_reader.c
  73
+@@ -432,7 +432,11 @@ dvd_reader_t *DVDOpen( const char *ppath )
  74
+ 	{
  75
+       if( ( cdir  = open( ".", O_RDONLY ) ) >= 0 ) {
  76
+         if( chdir( path_copy ) == -1 ) {
  77
++#if defined(_XBMC)
  78
++          fprintf( stderr, "libdvdread: failed to change working directory to \"%s\": %s\n", path_copy, strerror(errno)); /* but ignore error */
  79
++#else
  80
+           goto DVDOpen_error;
  81
++#endif // _XBMC
  82
+         }
  83
+ 		new_path = malloc(PATH_MAX+1);
  84
+ 		if(!new_path) {
  85
+-- 
  86
+1.7.9.4
  87
+

0 notes on commit 217532d

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