summaryrefslogtreecommitdiff
path: root/multimedia/ldvd/files/patch-ldvd-ls.c
diff options
context:
space:
mode:
authorMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2005-12-12 18:34:48 +0000
committerMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2005-12-12 18:34:48 +0000
commit56931c898f12eadd08fba3a0a04d40809bfd7636 (patch)
tree3ffda843877e988e13b67f3b9575f3cd495e3c74 /multimedia/ldvd/files/patch-ldvd-ls.c
parentThe distfile has been renamed. (diff)
1) Fix dvd information parsing by using the ports internally supplied
lsdvd-ls application instead of the port multimedia/lsdvd 2) Bump PORTREVISION due to [1] 3) Take over maintainership as per previous maintainer request: "I don't use it anymore" Approved by: Andreas Fehlner <fehlner@gmx.de> (previous maintainer)
Notes
Notes: svn path=/head/; revision=151021
Diffstat (limited to 'multimedia/ldvd/files/patch-ldvd-ls.c')
-rw-r--r--multimedia/ldvd/files/patch-ldvd-ls.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/multimedia/ldvd/files/patch-ldvd-ls.c b/multimedia/ldvd/files/patch-ldvd-ls.c
new file mode 100644
index 000000000000..002ca12bc748
--- /dev/null
+++ b/multimedia/ldvd/files/patch-ldvd-ls.c
@@ -0,0 +1,34 @@
+--- ldvd-ls.c.orig Thu Dec 8 22:09:02 2005
++++ ldvd-ls.c Thu Dec 8 22:51:43 2005
+@@ -155,18 +155,25 @@
+ 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)) ) {
+- fclose(filehandle);
+- fprintf(stderr, "Couldn't read enough bytes for title.\n");
+- strcpy(title, "unknown");
+- return -1;
++ {
++ #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);