diff options
author | snj <snj@pkgsrc.org> | 2007-02-26 17:55:14 +0000 |
---|---|---|
committer | snj <snj@pkgsrc.org> | 2007-02-26 17:55:14 +0000 |
commit | 7808c0a636a0743f9f8c5c85fe0071f430191547 (patch) | |
tree | 088e7e8bfa55afb7bc80edcc2184b259ea835ac4 /multimedia | |
parent | 7caa76450d739d80e7376922547acd8cba1e447d (diff) | |
download | pkgsrc-7808c0a636a0743f9f8c5c85fe0071f430191547.tar.gz |
Apply patch from Kimura Fuyuki in PR pkg/35703: Fix printing of DVD titles.
Originally from FreeBSD ports.
Bump PKGREVISION.
Diffstat (limited to 'multimedia')
-rw-r--r-- | multimedia/lsdvd/Makefile | 4 | ||||
-rw-r--r-- | multimedia/lsdvd/distinfo | 4 | ||||
-rw-r--r-- | multimedia/lsdvd/patches/patch-ab | 67 |
3 files changed, 70 insertions, 5 deletions
diff --git a/multimedia/lsdvd/Makefile b/multimedia/lsdvd/Makefile index 573e851c880..2b963d8579e 100644 --- a/multimedia/lsdvd/Makefile +++ b/multimedia/lsdvd/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.10 2006/08/27 18:15:51 xtraeme Exp $ +# $NetBSD: Makefile,v 1.11 2007/02/26 17:55:14 snj Exp $ DISTNAME= lsdvd-0.16 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= multimedia MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=acidrip/} diff --git a/multimedia/lsdvd/distinfo b/multimedia/lsdvd/distinfo index 80c1e56a5ca..acc52dfeab2 100644 --- a/multimedia/lsdvd/distinfo +++ b/multimedia/lsdvd/distinfo @@ -1,7 +1,7 @@ -$NetBSD: distinfo,v 1.5 2006/08/24 09:58:14 xtraeme Exp $ +$NetBSD: distinfo,v 1.6 2007/02/26 17:55:14 snj Exp $ SHA1 (lsdvd-0.16.tar.gz) = e50f4820ec765bdcf40ae87b96c7be6f2776306e RMD160 (lsdvd-0.16.tar.gz) = 3b35b4e4e8360f72cfc3cf3a5c3cff551bf03cec Size (lsdvd-0.16.tar.gz) = 100451 bytes SHA1 (patch-aa) = 41ac6688a47ca1f7f20d17c4fd3d2934eecd369c -SHA1 (patch-ab) = ab3f9890151ba3f3676e4a4226063e35ed5e0bf5 +SHA1 (patch-ab) = 4beb67fad17313ab2dc200c3efdcbc7fd2495526 diff --git a/multimedia/lsdvd/patches/patch-ab b/multimedia/lsdvd/patches/patch-ab index 9c17ae118bd..d4992af8c1e 100644 --- a/multimedia/lsdvd/patches/patch-ab +++ b/multimedia/lsdvd/patches/patch-ab @@ -1,4 +1,4 @@ -$NetBSD: patch-ab,v 1.2 2006/08/24 09:58:15 xtraeme Exp $ +$NetBSD: patch-ab,v 1.3 2007/02/26 17:55:14 snj Exp $ --- lsdvd.c.orig 2006-08-24 11:51:58.000000000 +0200 +++ lsdvd.c 2006-08-24 11:52:09.000000000 +0200 @@ -10,3 +10,68 @@ $NetBSD: patch-ab,v 1.2 2006/08/24 09:58:15 xtraeme Exp $ #include <dvdread/ifo_read.h> #include <string.h> #include <sys/stat.h> +@@ -131,19 +132,26 @@ int get_title_name(const char* dvd_devic + return -1; + } + +- if ( fseek(filehandle, 32808, SEEK_SET )) { ++ if ( fseek(filehandle, 32768, SEEK_SET )) { + fclose(filehandle); + fprintf(stderr, "Couldn't seek in %s for title\n", dvd_device); + strcpy(title, "unknown"); + return -1; + } + +- if ( 32 != (i = fread(title, 1, 32, filehandle)) ) { ++ { ++ #define DVD_SEC_SIZ 2048 ++ char tempBuf[ DVD_SEC_SIZ ]; ++ ++ if ( DVD_SEC_SIZ != fread(tempBuf, 1, DVD_SEC_SIZ, filehandle) ) { + fclose(filehandle); + fprintf(stderr, "Couldn't read enough bytes for title.\n"); + strcpy(title, "unknown"); + return -1; + } ++ snprintf( title, 32, "%s", tempBuf + 40 ); ++ i=32; ++ } + + fclose (filehandle); + +@@ -239,6 +247,7 @@ int main(int argc, char *argv[]) + int has_title = 0, ret = 0; + int max_length = 0, max_track = 0; + struct stat dvd_stat; ++ struct dvd_info dvd_info; + + program_name = argv[0]; + +@@ -309,8 +318,6 @@ int main(int argc, char *argv[]) + + vmgi_mat = ifo_zero->vmgi_mat; + +- struct dvd_info dvd_info; +- + dvd_info.discinfo.device = dvd_device; + dvd_info.discinfo.disc_title = has_title ? "unknown" : title; + dvd_info.discinfo.vmg_id = vmgi_mat->vmg_identifier; +@@ -409,14 +416,16 @@ int main(int argc, char *argv[]) + + cell = 0; + if (opt_c) { ++ int ms; ++ + dvd_info.titles[j].chapter_count = pgc->nr_of_programs; + dvd_info.titles[j].chapters = calloc(dvd_info.titles[j].chapter_count, sizeof(*dvd_info.titles[j].chapters)); + +- int ms; + for (i=0; i<pgc->nr_of_programs; i++) + { ++ int next; + ms=0; +- int next = pgc->program_map[i+1]; ++ next = pgc->program_map[i+1]; + if (i == pgc->nr_of_programs - 1) next = pgc->nr_of_cells + 1; + + while (cell < next - 1) |