mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
MusePak: A bit more accurate calculation of the stream length.
This commit is contained in:
parent
4a014c8113
commit
3a1c784eec
@ -315,7 +315,19 @@ void MPC::File::read(bool readProperties, Properties::ReadStyle /* propertiesSty
|
||||
// Look for MPC metadata
|
||||
|
||||
if(readProperties) {
|
||||
d->properties = new Properties(this, length() - d->ID3v2Size - d->APESize);
|
||||
long streamLength;
|
||||
|
||||
if(d->hasAPE)
|
||||
streamLength = d->APELocation;
|
||||
else if(d->hasID3v1)
|
||||
streamLength = d->ID3v1Location;
|
||||
else
|
||||
streamLength = length();
|
||||
|
||||
if(d->hasID3v2)
|
||||
streamLength -= (d->ID3v2Location + d->ID3v2Size);
|
||||
|
||||
d->properties = new Properties(this, streamLength);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user