mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-28 16:30:54 +01:00
Fix EA-XMA segfault
This commit is contained in:
parent
a2a43c2502
commit
7e6e8900c2
@ -1054,6 +1054,9 @@ static size_t calculate_eaac_size(VGMSTREAM *vgmstream, STREAMFILE *streamFile,
|
|||||||
uint32_t total_samples;
|
uint32_t total_samples;
|
||||||
size_t stream_size, file_size;
|
size_t stream_size, file_size;
|
||||||
|
|
||||||
|
if (streamFile == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
switch (eaac->codec) {
|
switch (eaac->codec) {
|
||||||
case EAAC_CODEC_EAXMA:
|
case EAAC_CODEC_EAXMA:
|
||||||
case EAAC_CODEC_EALAYER3_V1:
|
case EAAC_CODEC_EALAYER3_V1:
|
||||||
@ -1154,6 +1157,7 @@ static segmented_layout_data* build_segmented_eaaudiocore_looping(STREAMFILE *st
|
|||||||
if (!vgmstream_open_stream(data->segments[i],temp_streamFile[i],0x00))
|
if (!vgmstream_open_stream(data->segments[i],temp_streamFile[i],0x00))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
//todo temp_streamFile doesn't contain EAXMA's streamfile
|
||||||
data->segments[i]->stream_size = calculate_eaac_size(data->segments[i], temp_streamFile[i], eaac, 0x00);
|
data->segments[i]->stream_size = calculate_eaac_size(data->segments[i], temp_streamFile[i], eaac, 0x00);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user