mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-17 23:36:41 +01:00
Allow repeated VGMSTREAMs in segment layout
This commit is contained in:
parent
e473e7aba9
commit
5d8d462067
@ -203,13 +203,23 @@ fail:
|
||||
}
|
||||
|
||||
void free_layout_segmented(segmented_layout_data *data) {
|
||||
int i;
|
||||
int i, j;
|
||||
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
if (data->segments) {
|
||||
for (i = 0; i < data->segment_count; i++) {
|
||||
int is_repeat = 0;
|
||||
|
||||
/* segments are allowed to be repeated so don't close the same thing twice */
|
||||
for (j = 0; j < i; j++) {
|
||||
if (data->segments[i] == data->segments[j])
|
||||
is_repeat = 1;
|
||||
}
|
||||
if (is_repeat)
|
||||
continue;
|
||||
|
||||
close_vgmstream(data->segments[i]);
|
||||
}
|
||||
free(data->segments);
|
||||
|
Loading…
x
Reference in New Issue
Block a user