diff dvdread/ifo_read.c @ 366:5b8539cacebf src

workaround wrong filesize indicated in the UDF; patch by unknown author posted by Alexander Roalter it
author nicodvb
date Tue, 27 May 2008 21:53:10 +0000
parents 23607807ff65
children
line wrap: on
line diff
--- a/dvdread/ifo_read.c	Thu May 22 20:29:08 2008 +0000
+++ b/dvdread/ifo_read.c	Tue May 27 21:53:10 2008 +0000
@@ -89,6 +89,9 @@
 static void ifoFree_PGC_COMMAND_TBL(pgc_command_tbl_t *cmd_tbl);
 static void ifoFree_PGCIT_internal(pgcit_t *pgcit);
 
+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);
+}
 
 static inline int DVDFileSeek_( dvd_file_t *dvd_file, uint32_t offset ) {
   return (DVDFileSeek(dvd_file, (int)offset) == (int)offset);
@@ -1689,7 +1692,7 @@
   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)))