diff options
| author | Emanuel Haupt <ehaupt@FreeBSD.org> | 2012-07-28 12:29:36 +0000 |
|---|---|---|
| committer | Emanuel Haupt <ehaupt@FreeBSD.org> | 2012-07-28 12:29:36 +0000 |
| commit | ab95dca6d1b9e44c5a69b60f7280810a9fce8c93 (patch) | |
| tree | 8f5b7fe4a64838a6abc329561d2b45986d8bd08e /sysutils/dvdbackup/files | |
| parent | 1eaf9d912bd0886b9deb149d432302debe2ac26b (diff) | |
Notes
Diffstat (limited to 'sysutils/dvdbackup/files')
| -rw-r--r-- | sysutils/dvdbackup/files/patch-src::dvdbackup.c | 42 | ||||
| -rw-r--r-- | sysutils/dvdbackup/files/patch-src__dvdbackup.c | 18 |
2 files changed, 18 insertions, 42 deletions
diff --git a/sysutils/dvdbackup/files/patch-src::dvdbackup.c b/sysutils/dvdbackup/files/patch-src::dvdbackup.c deleted file mode 100644 index 5c509eb9d873..000000000000 --- a/sysutils/dvdbackup/files/patch-src::dvdbackup.c +++ /dev/null @@ -1,42 +0,0 @@ ---- src/dvdbackup.c.orig 2010-09-16 22:10:04.307951355 +0200 -+++ src/dvdbackup.c 2010-09-16 22:19:49.112413564 +0200 -@@ -99,7 +99,8 @@ - - - static int CheckSizeArray(const int size_array[], int reference, int target) { -- if ( (size_array[reference]/size_array[target] == 1) && -+ if ( size_array[target] && -+ (size_array[reference]/size_array[target] == 1) && - ((size_array[reference] * 2 - size_array[target])/ size_array[target] == 1) && - ((size_array[reference]%size_array[target] * 3) < size_array[reference]) ) { - /* We have a dual DVD with two feature films - now let's see if they have the same amount of chapters*/ -@@ -1264,7 +1265,7 @@ - - /* Seek to title of first track, which is at (track_no * 32768) + 40 */ - -- if ( 32808 != lseek(filehandle, 32808, SEEK_SET) ) { -+ if ( 32768 != lseek(filehandle, 32768, SEEK_SET) ) { - close(filehandle); - fprintf(stderr, _("Cannot seek DVD device %s - check your DVD device\n"), device); - return(1); -@@ -1272,10 +1273,16 @@ - - /* Read the DVD-Video title */ - -- if ( 32 != read(filehandle, title, 32)) { -- close(filehandle); -- fprintf(stderr, _("Cannot read title from DVD device %s\n"), device); -- return(1); -+#define DVD_SEC_SIZ 2048 -+ { -+ char tempBuf[ DVD_SEC_SIZ ]; -+ -+ if (DVD_SEC_SIZ != read(filehandle, tempBuf, DVD_SEC_SIZ)) { -+ close(filehandle); -+ fprintf(stderr, _("Cannot read title from DVD device %s\n"), device); -+ return(1); -+ } -+ snprintf( title, 32, "%s", tempBuf + 40 ); - } - - /* Terminate the title string */ diff --git a/sysutils/dvdbackup/files/patch-src__dvdbackup.c b/sysutils/dvdbackup/files/patch-src__dvdbackup.c new file mode 100644 index 000000000000..cc414effd320 --- /dev/null +++ b/sysutils/dvdbackup/files/patch-src__dvdbackup.c @@ -0,0 +1,18 @@ +--- ./src/dvdbackup.c.orig 2012-06-24 03:10:29.000000000 +0200 ++++ ./src/dvdbackup.c 2012-07-28 13:57:54.000000000 +0200 +@@ -1546,7 +1546,6 @@ + + title_set_info = DVDGetFileSet(_dvd); + if (!title_set_info) { +- DVDClose(_dvd); + return(1); + } + +@@ -1573,7 +1572,6 @@ + title_set_info = DVDGetFileSet(_dvd); + + if (!title_set_info) { +- DVDClose(_dvd); + return(1); + } + |
