Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 169596 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 libdvdnav
libdvdnav-0.1.10-udf.patch (text/plain), 2.64 KB, created by
Peter Große
on 2008-10-23 17:17:27 UTC
(
hide
)
Description:
fixes libdvdnav
Filename:
MIME Type:
Creator:
Peter Große
Created:
2008-10-23 17:17:27 UTC
Size:
2.64 KB
patch
obsolete
>diff -Naurp src/dvdread/dvd_reader.c src/dvdread/dvd_reader.c >--- src/dvdread/dvd_reader.c 2006-10-06 07:58:03.000000000 +0000 >+++ src/dvdread/dvd_reader.c 2008-02-22 19:42:47.000000000 +0000 >@@ -1017,6 +1017,28 @@ int32_t DVDFileSeek( dvd_file_t *dvd_fi > return offset; > } > >+int32_t DVDFileSeekForce( dvd_file_t *dvd_file, int offset, int force_size ) >+{ >+ /* Check arguments. */ >+ if( dvd_file == NULL || offset < 0 ) >+ return -1; >+ >+ if( dvd_file->dvd->isImageFile ) { >+ if( force_size < 0 ) >+ force_size = (offset - 1) / DVD_VIDEO_LB_LEN + 1; >+ if( dvd_file->filesize < force_size ) { >+ dvd_file->filesize = force_size; >+ fprintf(stderr, "libdvdread: Ignored UDF provided size of file.\n"); >+ } >+ } >+ >+ if( offset > dvd_file->filesize * DVD_VIDEO_LB_LEN ) { >+ return -1; >+ } >+ dvd_file->seek_pos = (uint32_t) offset; >+ return offset; >+} >+ > ssize_t DVDReadBytes( dvd_file_t *dvd_file, void *data, size_t byte_size ) > { > unsigned char *secbuf_base, *secbuf; >@@ -1057,7 +1057,7 @@ ssize_t DVDReadBytes( dvd_file_t *dvd_fi > memcpy( data, &(secbuf[ seek_byte ]), byte_size ); > free( secbuf_base ); > >- dvd_file->seek_pos += byte_size; >+ DVDFileSeekForce(dvd_file, dvd_file->seek_pos + byte_size, -1); > return byte_size; > } > >diff -Naurp src/dvdread/dvd_reader.h src/dvdread/dvd_reader.h >--- src/dvdread/dvd_reader.h 2006-10-06 08:12:31.000000000 +0000 >+++ src/dvdread/dvd_reader.h 2008-02-22 19:42:28.000000000 +0000 >@@ -169,6 +169,8 @@ ssize_t DVDReadBlocks( dvd_file_t *, int > */ > int32_t DVDFileSeek( dvd_file_t *, int32_t ); > >+int32_t DVDFileSeekForce( dvd_file_t *, int, int ); >+ > /** > * Reads the given number of bytes from the file. This call can only be used > * on the information files, and may not be used for reading from a VOB. This >diff -Naurp src/dvdread/ifo_read.c src/dvdread/ifo_read.c >--- src/dvdread/ifo_read.c 2006-01-22 12:19:19.000000000 +0000 >+++ src/dvdread/ifo_read.c 2008-02-22 19:42:28.000000000 +0000 >@@ -93,6 +93,10 @@ static inline int DVDFileSeek_( dvd_file > return (DVDFileSeek(dvd_file, (int)offset) == (int)offset); > } > >+static inline int DVDFileSeekForce_( dvd_file_t *dvd_file, uint32_t offset, int force_size ) { >+ return (DVDFileSeekForce(dvd_file, (int)offset, force_size) == (int)offset); >+} >+ > > ifo_handle_t *ifoOpen(dvd_reader_t *dvd, int title) { > ifo_handle_t *ifofile; >@@ -1507,7 +1507,7 @@ static int ifoRead_VOBU_ADMAP_internal(i > unsigned int i; > int info_length; > >- if(!DVDFileSeek_(ifofile->file, sector * DVD_BLOCK_LEN)) >+ if(!DVDFileSeekForce_(ifofile->file, sector * DVD_BLOCK_LEN, sector)) > return 0; > > if(!(DVDReadBytes(ifofile->file, vobu_admap, VOBU_ADMAP_SIZE))) >
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