Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 142572 Details for
Bug 208691
media-libs/{libdvdread,xine-lib} can't play DVDs with DVD-Movie-Protect
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fixes libdvdread
libdvdread-0.9.7_udf.patch (text/plain), 3.28 KB, created by
Sebastian Krueger
on 2008-02-03 04:19:38 UTC
(
hide
)
Description:
fixes libdvdread
Filename:
MIME Type:
Creator:
Sebastian Krueger
Created:
2008-02-03 04:19:38 UTC
Size:
3.28 KB
patch
obsolete
>diff -ru libdvdread-0.9.7.orig/dvdread/dvd_input.c libdvdread-0.9.7/dvdread/dvd_input.c >--- libdvdread-0.9.7.orig/dvdread/dvd_input.c 2005-09-19 15:43:08.000000000 +0200 >+++ libdvdread-0.9.7/dvdread/dvd_input.c 2007-11-06 13:56:28.000000000 +0100 >@@ -376,6 +376,9 @@ > } > #endif /* HAVE_DVDCSS_DVDCSS_H */ > >+ >+ fprintf(stderr, "libdvdread patched to play DVDs with DVD-Movie-Protect by Seby\n"); >+ fprintf(stderr, "With help from: http://tobias.rautenkranz.ch/libdvdread_ifo.html\n"); >+ > dvdcss_library_init = 1; > > if(dvdcss_library) { >diff -ru libdvdread-0.9.7.orig/dvdread/dvd_udf.c libdvdread-0.9.7/dvdread/dvd_udf.c >--- libdvdread-0.9.7.orig/dvdread/dvd_udf.c 2005-09-19 15:43:08.000000000 +0200 >+++ libdvdread-0.9.7/dvdread/dvd_udf.c 2007-10-31 22:44:50.000000000 +0100 >@@ -39,6 +39,9 @@ > #include <sys/stat.h> > #include <unistd.h> > #include <errno.h> >+#ifndef __WIN32__ >+#include <fnmatch.h> >+#endif > > #if defined(HAVE_INTTYPES_H) > #include <inttypes.h> >@@ -50,6 +53,9 @@ > #include "dvd_udf.h" > #include "dvdread_internal.h" > >+#include "ifo_types.h" >+#include "ifo_read.h" >+ > #ifndef EMEDIUMTYPE > #define EMEDIUMTYPE ENOENT > #endif >@@ -965,6 +971,77 @@ > uint32_t UDFFindFile( dvd_reader_t *device, char *filename, > uint32_t *filesize ) > { >+ uint32_t offset=0; >+#ifndef __WIN32__ >+ if (!fnmatch("/VIDEO_TS/VTS_[0-9][0-9]_[0-9].???", filename, FNM_PATHNAME)) { >+#else >+ if (strlen("/VIDEO_TS/VTS_01_1.VOB") == strlen(filename) >+ && !strncmp(filename, "/VIDEO_TS/VTS_", strlen("/VIDEO_TS/VTS_")) ) { >+#endif >+ size_t len = strlen(filename); >+ char *extension = &filename[len-3]; >+ if (!strcmp(extension, "IFO") || !strcmp(extension, "VOB")) { >+ int title = atoi(&filename[len-8]); >+ int part = atoi(&filename[len-5]); >+ >+ ifo_handle_t *ifo_handle = ifoOpen(device, 0); >+ if (0 == ifo_handle) >+ return 0; >+ >+ if (title > ifo_handle->tt_srpt->nr_of_srpts) { >+ ifoClose(ifo_handle); >+ return 0; >+ >+ } >+ >+ uint32_t tmp_filesize; >+ offset += UDFFindFile(device, "/VIDEO_TS/VIDEO_TS.IFO", &tmp_filesize); >+ >+ >+ int i; >+ for (i=0; i<ifo_handle->tt_srpt->nr_of_srpts; i++) >+ if (title == ifo_handle->tt_srpt->title[i].title_set_nr) >+ break; >+ >+ if (i == ifo_handle->tt_srpt->nr_of_srpts) { >+ /* not found */ >+ ifoClose(ifo_handle); >+ return 0; >+ } >+ offset += ifo_handle->tt_srpt->title[i].title_set_sector; >+ >+ ifoClose(ifo_handle); >+ >+ if (!strcmp(extension, "VOB")) { >+ ifo_handle = ifoOpen(device, title); >+ if (0 == ifo_handle) >+ return 0; >+ >+ switch(part) { >+ case 0: >+ if (0 == ifo_handle->vtsi_mat->vtsm_vobs) >+ return 0; >+ offset += ifo_handle->vtsi_mat->vtsm_vobs; >+ break; >+ case 1: >+ if (0 == ifo_handle->vtsi_mat->vtstt_vobs) >+ return 0; >+ offset += ifo_handle->vtsi_mat->vtstt_vobs; >+ break; >+ default: /* can't get other parts (also no need to) */ >+ offset = 0; >+ break; >+ } >+ >+ ifoClose(ifo_handle); >+ } >+ >+ } >+ >+ *filesize = 1000000; /* File size unknown */ >+ if (offset != 0) >+ return offset; >+ } > uint8_t *LogBlock; > uint32_t lbnum; > uint16_t TagID;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 208691
:
142570
| 142572 |
169596