Mercurial > libdvdread4.hg
comparison dvd_reader.c @ 7:a481060ec57b src
fixed incorrect type cast; patch by Erik Hovland org
author | nicodvb |
---|---|
date | Thu, 05 Jun 2008 10:19:55 +0000 |
parents | e5663591d13c |
children | fce16251755c |
comparison
equal
deleted
inserted
replaced
6:e5663591d13c | 7:a481060ec57b |
---|---|
1136 dvd_file_t *dvd_file = DVDOpenFile( dvd, title, DVD_READ_INFO_FILE ); | 1136 dvd_file_t *dvd_file = DVDOpenFile( dvd, title, DVD_READ_INFO_FILE ); |
1137 if( dvd_file != NULL ) { | 1137 if( dvd_file != NULL ) { |
1138 ssize_t bytes_read; | 1138 ssize_t bytes_read; |
1139 size_t file_size = dvd_file->filesize * DVD_VIDEO_LB_LEN; | 1139 size_t file_size = dvd_file->filesize * DVD_VIDEO_LB_LEN; |
1140 char *buffer_base = malloc( file_size + 2048 ); | 1140 char *buffer_base = malloc( file_size + 2048 ); |
1141 char *buffer = (unsigned char *)(((uintptr_t)buffer_base & ~((uintptr_t)2047)) + 2048); | 1141 char *buffer = (char *)(((uintptr_t)buffer_base & ~((uintptr_t)2047)) + 2048); |
1142 | 1142 |
1143 if( buffer_base == NULL ) { | 1143 if( buffer_base == NULL ) { |
1144 DVDCloseFile( dvd_file ); | 1144 DVDCloseFile( dvd_file ); |
1145 fprintf( stderr, "libdvdread: DVDDiscId, failed to " | 1145 fprintf( stderr, "libdvdread: DVDDiscId, failed to " |
1146 "allocate memory for file read!\n" ); | 1146 "allocate memory for file read!\n" ); |