diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/input/libdvdread/diff_against_cvs.patch | 53 |
1 files changed, 40 insertions, 13 deletions
diff --git a/src/input/libdvdread/diff_against_cvs.patch b/src/input/libdvdread/diff_against_cvs.patch index 349b4c1ee..074d111f2 100644 --- a/src/input/libdvdread/diff_against_cvs.patch +++ b/src/input/libdvdread/diff_against_cvs.patch @@ -28,7 +28,34 @@ #include "dvd_udf.h" #include "dvd_input.h" #include "dvd_reader.h" -@@ -349,7 +350,7 @@ +@@ -303,17 +304,23 @@ + if( path == NULL ) + return 0; + ++ /* Try to open libdvdcss or fall back to standard functions */ ++ have_css = dvdinput_setup(); ++ + ret = stat( path, &fileinfo ); + if( ret < 0 ) { ++ ++ /* maybe "host:port" url? try opening it with acCeSS library */ ++ if( strchr(path,':') ) { ++ return DVDOpenImageFile( path, have_css ); ++ } ++ + /* If we can't stat the file, give up */ + fprintf( stderr, "libdvdread: Can't stat %s\n", path ); + perror(""); + return 0; + } + +- /* Try to open libdvdcss or fall back to standard functions */ +- have_css = dvdinput_setup(); +- + /* First check if this is a block/char device or a file*/ + if( S_ISBLK( fileinfo.st_mode ) || + S_ISCHR( fileinfo.st_mode ) || +@@ -349,7 +356,7 @@ if( cdir >= 0 ) { chdir( path_copy ); @@ -37,7 +64,7 @@ fchdir( cdir ); close( cdir ); if( new_path ) { -@@ -513,7 +514,7 @@ +@@ -513,7 +520,7 @@ static int findDVDFile( dvd_reader_t *dvd, const char *file, char *filename ) { @@ -46,7 +73,7 @@ const char *nodirfile; int ret; -@@ -547,7 +548,7 @@ +@@ -547,7 +554,7 @@ */ static dvd_file_t *DVDOpenFilePath( dvd_reader_t *dvd, char *filename ) { @@ -55,7 +82,7 @@ dvd_file_t *dvd_file; struct stat fileinfo; dvd_input_t dev; -@@ -631,7 +632,7 @@ +@@ -631,7 +638,7 @@ static dvd_file_t *DVDOpenVOBPath( dvd_reader_t *dvd, int title, int menu ) { char filename[ MAX_UDF_FILE_NAME_LEN ]; @@ -64,7 +91,7 @@ struct stat fileinfo; dvd_file_t *dvd_file; int i; -@@ -930,7 +931,7 @@ +@@ -930,7 +937,7 @@ ssize_t DVDReadBytes( dvd_file_t *dvd_file, void *data, size_t byte_size ) { @@ -73,7 +100,7 @@ unsigned int numsec, seek_sector, seek_byte; int ret; -@@ -944,8 +945,9 @@ +@@ -944,8 +951,9 @@ numsec = ( ( seek_byte + byte_size ) / DVD_VIDEO_LB_LEN ) + ( ( ( seek_byte + byte_size ) % DVD_VIDEO_LB_LEN ) ? 1 : 0 ); @@ -85,7 +112,7 @@ fprintf( stderr, "libdvdread: Can't allocate memory " "for file read!\n" ); return 0; -@@ -960,12 +962,12 @@ +@@ -960,12 +968,12 @@ } if( ret != (int) numsec ) { @@ -100,7 +127,7 @@ dvd_file->seek_pos += byte_size; return byte_size; -@@ -997,9 +999,10 @@ +@@ -997,9 +1005,10 @@ if( dvd_file != NULL ) { ssize_t bytes_read; size_t file_size = dvd_file->filesize * DVD_VIDEO_LB_LEN; @@ -113,7 +140,7 @@ fprintf( stderr, "libdvdread: DVDDiscId, failed to " "allocate memory for file read!\n" ); return -1; -@@ -1009,13 +1012,14 @@ +@@ -1009,13 +1018,14 @@ fprintf( stderr, "libdvdread: DVDDiscId read returned %d bytes" ", wanted %d\n", bytes_read, file_size ); DVDCloseFile( dvd_file ); @@ -129,7 +156,7 @@ } } md5_finish_ctx( &ctx, discid ); -@@ -1028,7 +1032,7 @@ +@@ -1028,7 +1038,7 @@ char *volid, unsigned int volid_size, unsigned char *volsetid, unsigned int volsetid_size ) { @@ -138,7 +165,7 @@ int ret; /* Check arguments. */ -@@ -1040,8 +1044,10 @@ +@@ -1040,8 +1050,10 @@ return -1; } @@ -151,7 +178,7 @@ fprintf( stderr, "libdvdread: DVDISOVolumeInfo, failed to " "allocate memory for file read!\n" ); return -1; -@@ -1051,6 +1057,7 @@ +@@ -1051,6 +1063,7 @@ if( ret != 1 ) { fprintf( stderr, "libdvdread: DVDISOVolumeInfo, failed to " "read ISO9660 Primary Volume Descriptor!\n" ); @@ -159,7 +186,7 @@ return -1; } -@@ -1076,6 +1083,7 @@ +@@ -1076,6 +1089,7 @@ } memcpy(volsetid, &buffer[190], volsetid_size); } |