mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-29 19:37:30 +01:00
Fixed bitrate calculator for formats that leave some channels' streamfile pointers empty
This commit is contained in:
parent
7807f59f22
commit
9732c8a0a5
@ -3329,10 +3329,14 @@ int get_vgmstream_average_bitrate(VGMSTREAM * vgmstream)
|
||||
for (i = 1; i < vgmstream->channels; ++i)
|
||||
{
|
||||
VGMSTREAMCHANNEL * ch = &vgmstream->ch[i];
|
||||
if (!ch->streamfile)
|
||||
continue;
|
||||
ch->streamfile->get_name(ch->streamfile, path_current, sizeof(path_current));
|
||||
for (j = 0; j < i; ++j)
|
||||
{
|
||||
VGMSTREAMCHANNEL * chc = &vgmstream->ch[j];
|
||||
if (!chc->streamfile)
|
||||
continue;
|
||||
chc->streamfile->get_name(chc->streamfile, path_compare, sizeof(path_compare));
|
||||
if (!strcmp(path_current, path_compare))
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user