summaryrefslogtreecommitdiff
path: root/src/input/libdvdnav/dvd_reader.c
diff options
context:
space:
mode:
authorRocky Bernstein <rockyb@users.sourceforge.net>2004-02-19 02:50:24 +0000
committerRocky Bernstein <rockyb@users.sourceforge.net>2004-02-19 02:50:24 +0000
commit5cb036aff44c2ff274ec38b28382245c5f695689 (patch)
treeb55f5f42c0cf359faddca2c2724bd41e626f8cdf /src/input/libdvdnav/dvd_reader.c
parent8aec8d2b5344d4f748755cfb328fd811a8bfc526 (diff)
downloadxine-lib-5cb036aff44c2ff274ec38b28382245c5f695689.tar.gz
xine-lib-5cb036aff44c2ff274ec38b28382245c5f695689.tar.bz2
Mandrake patches from
http://cvs.mandrakesoft.com/cgi-bin/cvsweb.cgi/SPECS/xine-lib/ via Goetz Waschk who reports: The amd64 patch (xine-lib-1-rc0a-amd64.patch) sets some conservative CFLAGS for amd64, the lib64 patch (xine-lib-1-rc0a-lib64.patch) replaces hardcoded /lib to support the lib64 library dir on amd64, the directfb patch (xine-lib-1-rc2-no-directfb.patch) adds a configure option to disable directfb, the linuxfb patch (xine-lib-1-rc3a-no-linuxfb.patch) does the same for linux framebuffer and the 64bit fixes patch (xine-lib-1-rc3-64bit-fixes.patch) doesn't apply at the moment against the CVS -- demux_ogg.c was not applied. it includes some 64 bit pointer and other fixes for 64bit architectures. from Gwenole Beauchesne I haven't tested other than apply and compile. CVS patchset: 6174 CVS date: 2004/02/19 02:50:24
Diffstat (limited to 'src/input/libdvdnav/dvd_reader.c')
-rw-r--r--src/input/libdvdnav/dvd_reader.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/input/libdvdnav/dvd_reader.c b/src/input/libdvdnav/dvd_reader.c
index a96801c9d..b173a130e 100644
--- a/src/input/libdvdnav/dvd_reader.c
+++ b/src/input/libdvdnav/dvd_reader.c
@@ -1020,7 +1020,7 @@ ssize_t DVDReadBytes( dvd_file_t *dvd_file, void *data, size_t byte_size )
( ( ( seek_byte + byte_size ) % DVD_VIDEO_LB_LEN ) ? 1 : 0 );
secbuf_base = (unsigned char *) malloc( numsec * DVD_VIDEO_LB_LEN + 2048 );
- secbuf = (unsigned char *)(((uintptr_t)secbuf_base & ~2047) + 2048);
+ secbuf = (unsigned char *)(((uintptr_t)secbuf_base & ~((uintptr_t)2047)) + 2048);
if( !secbuf_base ) {
fprintf( stderr, "libdvdread: Can't allocate memory "
"for file read!\n" );
@@ -1074,7 +1074,7 @@ int DVDDiscID( dvd_reader_t *dvd, unsigned char *discid )
ssize_t bytes_read;
size_t file_size = dvd_file->filesize * DVD_VIDEO_LB_LEN;
char *buffer_base = malloc( file_size + 2048 );
- char *buffer = (unsigned char *)(((uintptr_t)buffer_base & ~2047) + 2048);
+ char *buffer = (unsigned char *)(((uintptr_t)buffer_base & ~((uintptr_t)2047)) + 2048);
if( buffer_base == NULL ) {
fprintf( stderr, "libdvdread: DVDDiscId, failed to "
@@ -1083,8 +1083,8 @@ int DVDDiscID( dvd_reader_t *dvd, unsigned char *discid )
}
bytes_read = DVDReadBytes( dvd_file, buffer, file_size );
if( bytes_read != file_size ) {
- fprintf( stderr, "libdvdread: DVDDiscId read returned %d bytes"
- ", wanted %d\n", bytes_read, file_size );
+ fprintf( stderr, "libdvdread: DVDDiscId read returned %zd bytes"
+ ", wanted %zd\n", bytes_read, file_size );
DVDCloseFile( dvd_file );
free( buffer_base );
return -1;
@@ -1119,7 +1119,7 @@ int DVDISOVolumeInfo( dvd_reader_t *dvd,
}
buffer_base = malloc( DVD_VIDEO_LB_LEN + 2048 );
- buffer = (unsigned char *)(((uintptr_t)buffer_base & ~2047) + 2048);
+ buffer = (unsigned char *)(((uintptr_t)buffer_base & ~((uintptr_t)2047)) + 2048);
if( buffer_base == NULL ) {
fprintf( stderr, "libdvdread: DVDISOVolumeInfo, failed to "