]> git.sesse.net Git - vlc/blobdiff - extras/contrib/src/Patches/libdvdread.patch
* ALL: Do no longer assume a default DVD drive. If no DVD drive is
[vlc] / extras / contrib / src / Patches / libdvdread.patch
index 6da659844b3f56c83f4f5fe740c933e8cb87e03a..e81321549366f4674933431ab3b8707b27514fa3 100644 (file)
@@ -1,6 +1,7 @@
-diff -ru libdvdread-orig/dvdread/bswap.h libdvdread/dvdread/bswap.h
---- libdvdread-orig/dvdread/bswap.h    Sat Mar 12 16:42:18 2005
-+++ libdvdread/dvdread/bswap.h Sat Mar 12 16:42:25 2005
+Only in libdvdread/dvdread: .dvd_input.c.swp
+diff -ru libdvdread-0.9.4/dvdread/bswap.h libdvdread/dvdread/bswap.h
+--- libdvdread-0.9.4/dvdread/bswap.h   2002-12-15 01:09:12.000000000 +0100
++++ libdvdread/dvdread/bswap.h 2005-08-31 19:24:57.000000000 +0200
 @@ -65,7 +65,7 @@
   * functionality! 
   */
@@ -10,10 +11,29 @@ diff -ru libdvdread-orig/dvdread/bswap.h libdvdread/dvdread/bswap.h
  #define B2N_16(x) \
   x = ((((x) & 0xff00) >> 8) | \
        (((x) & 0x00ff) << 8))
-diff -ru libdvdread-orig/dvdread/dvd_reader.c libdvdread/dvdread/dvd_reader.c
---- libdvdread-orig/dvdread/dvd_reader.c       Sat Mar 12 16:42:18 2005
-+++ libdvdread/dvdread/dvd_reader.c    Sat Mar 12 16:48:29 2005
-@@ -344,14 +344,16 @@
+diff -ru libdvdread-0.9.4/dvdread/dvd_reader.c libdvdread/dvdread/dvd_reader.c
+--- libdvdread-0.9.4/dvdread/dvd_reader.c      2003-02-13 23:31:21.000000000 +0100
++++ libdvdread/dvdread/dvd_reader.c    2005-08-31 19:24:57.000000000 +0200
+@@ -303,8 +303,7 @@
+     if( path == NULL )
+       return 0;
+-    ret = stat( path, &fileinfo );
+-    if( ret < 0 ) {
++    if( *path && (ret = stat( path, &fileinfo ) < 0) ) {
+       /* If we can't stat the file, give up */
+       fprintf( stderr, "libdvdread: Can't stat %s\n", path );
+       perror("");
+@@ -315,7 +314,7 @@
+     have_css = dvdinput_setup();
+     /* First check if this is a block/char device or a file*/
+-    if( S_ISBLK( fileinfo.st_mode ) || 
++    if( !*path || S_ISBLK( fileinfo.st_mode ) || 
+       S_ISCHR( fileinfo.st_mode ) || 
+       S_ISREG( fileinfo.st_mode ) ) {
+@@ -344,14 +343,16 @@
  
        /* Resolve any symlinks and get the absolut dir name. */
        {
@@ -35,7 +55,7 @@ diff -ru libdvdread-orig/dvdread/dvd_reader.c libdvdread/dvdread/dvd_reader.c
                if( new_path ) {
                    free( path_copy );
                    path_copy = new_path;
-@@ -504,10 +506,12 @@
+@@ -504,10 +505,12 @@
              sprintf( filename, "%s%s%s", path,
                       ( ( path[ strlen( path ) - 1 ] == '/' ) ? "" : "/" ),
                       ent->d_name );
@@ -48,3 +68,4 @@ diff -ru libdvdread-orig/dvdread/dvd_reader.c libdvdread/dvdread/dvd_reader.c
      return -1;
  }
  
+Only in libdvdread/dvdread: dvd_reader.c.orig