comparison 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
comparison
equal deleted inserted replaced
365:b19a644148a9 366:5b8539cacebf
87 87
88 static void ifoFree_PGC(pgc_t *pgc); 88 static void ifoFree_PGC(pgc_t *pgc);
89 static void ifoFree_PGC_COMMAND_TBL(pgc_command_tbl_t *cmd_tbl); 89 static void ifoFree_PGC_COMMAND_TBL(pgc_command_tbl_t *cmd_tbl);
90 static void ifoFree_PGCIT_internal(pgcit_t *pgcit); 90 static void ifoFree_PGCIT_internal(pgcit_t *pgcit);
91 91
92 static inline int DVDFileSeekForce_( dvd_file_t *dvd_file, uint32_t offset, int force_size ) {
93 return (DVDFileSeekForce(dvd_file, (int)offset, force_size) == (int)offset);
94 }
92 95
93 static inline int DVDFileSeek_( dvd_file_t *dvd_file, uint32_t offset ) { 96 static inline int DVDFileSeek_( dvd_file_t *dvd_file, uint32_t offset ) {
94 return (DVDFileSeek(dvd_file, (int)offset) == (int)offset); 97 return (DVDFileSeek(dvd_file, (int)offset) == (int)offset);
95 } 98 }
96 99
1687 vobu_admap_t *vobu_admap, 1690 vobu_admap_t *vobu_admap,
1688 unsigned int sector) { 1691 unsigned int sector) {
1689 unsigned int i; 1692 unsigned int i;
1690 int info_length; 1693 int info_length;
1691 1694
1692 if(!DVDFileSeek_(ifofile->file, sector * DVD_BLOCK_LEN)) 1695 if(!DVDFileSeekForce_(ifofile->file, sector * DVD_BLOCK_LEN, sector))
1693 return 0; 1696 return 0;
1694 1697
1695 if(!(DVDReadBytes(ifofile->file, vobu_admap, VOBU_ADMAP_SIZE))) 1698 if(!(DVDReadBytes(ifofile->file, vobu_admap, VOBU_ADMAP_SIZE)))
1696 return 0; 1699 return 0;
1697 1700