mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-25 07:20:10 +01:00
Fix possible segfault
This commit is contained in:
parent
ee3fae5a37
commit
97874749da
@ -72,12 +72,11 @@ VGMSTREAM * init_vgmstream_msb_msh(STREAMFILE *streamFile) {
|
||||
vgmstream->interleave_block_size = 0x10;
|
||||
|
||||
|
||||
close_streamfile(streamHeader);
|
||||
|
||||
if (!vgmstream_open_stream(vgmstream,streamFile,start_offset))
|
||||
goto fail;
|
||||
return vgmstream;
|
||||
|
||||
close_streamfile(streamHeader);
|
||||
return vgmstream;
|
||||
|
||||
fail:
|
||||
close_streamfile(streamHeader);
|
||||
|
@ -33,7 +33,6 @@ VGMSTREAM * init_vgmstream_smc_smh(STREAMFILE *streamFile) {
|
||||
sample_rate = read_32bitLE(header_offset+0x08, streamHeader);
|
||||
/* 0x0c(2): always 0x10, frame size? */
|
||||
channel_count = read_16bitLE(header_offset+0x0e, streamHeader);
|
||||
|
||||
loop_flag = 0;
|
||||
|
||||
|
||||
@ -53,10 +52,10 @@ VGMSTREAM * init_vgmstream_smc_smh(STREAMFILE *streamFile) {
|
||||
vgmstream->interleave_block_size = read_32bitLE(0x04, streamHeader);
|
||||
|
||||
|
||||
close_streamfile(streamHeader);
|
||||
|
||||
if (!vgmstream_open_stream(vgmstream,streamFile,start_offset))
|
||||
goto fail;
|
||||
|
||||
close_streamfile(streamHeader);
|
||||
return vgmstream;
|
||||
|
||||
fail:
|
||||
|
Loading…
Reference in New Issue
Block a user