mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-02-20 20:41:08 +01:00
Ignore incorrectly ripped FSB5
This commit is contained in:
parent
579b734083
commit
c017eed7a5
@ -219,13 +219,19 @@ VGMSTREAM* init_vgmstream_fsb5(STREAMFILE* sf) {
|
||||
|
||||
extraflag_offset += 0x04 + extraflag_size;
|
||||
stream_header_size += 0x04 + extraflag_size;
|
||||
} while (extraflag_end != 0x00);
|
||||
}
|
||||
while (extraflag_end != 0x00);
|
||||
}
|
||||
|
||||
/* target found */
|
||||
if (i + 1 == target_subsong) {
|
||||
fsb5.stream_offset = fsb5.base_header_size + fsb5.sample_header_size + fsb5.name_table_size + data_offset;
|
||||
|
||||
/* catch bad rips (like incorrectly split +1.5GB .fsb with wrong header+data) */
|
||||
if (fsb5.stream_offset > get_streamfile_size(sf))
|
||||
goto fail;
|
||||
|
||||
|
||||
/* get stream size from next stream offset or full size if there is only one */
|
||||
if (i + 1 == fsb5.total_subsongs) {
|
||||
fsb5.stream_size = fsb5.sample_data_size - data_offset;
|
||||
|
Loading…
x
Reference in New Issue
Block a user