mirror of
https://github.com/taglib/taglib.git
synced 2025-06-03 00:58:12 -04:00
MPEG: No need to get the length of an ID3v2 tag twice.
This commit is contained in:
parent
f82be353b4
commit
b2c79bc084
@ -29,8 +29,6 @@
|
||||
#include "mpegproperties.h"
|
||||
#include "mpegfile.h"
|
||||
#include "xingheader.h"
|
||||
#include "id3v2tag.h"
|
||||
#include "id3v2header.h"
|
||||
#include "apetag.h"
|
||||
#include "apefooter.h"
|
||||
|
||||
@ -203,14 +201,11 @@ void MPEG::Properties::read(File *file)
|
||||
|
||||
d->bitrate = firstHeader.bitrate();
|
||||
|
||||
long long streamLength = file->length();
|
||||
long streamLength = file->length() - first;
|
||||
|
||||
if(file->hasID3v1Tag())
|
||||
streamLength -= 128;
|
||||
|
||||
if(file->hasID3v2Tag())
|
||||
streamLength -= file->ID3v2Tag()->header()->completeTagSize();
|
||||
|
||||
if(file->hasAPETag())
|
||||
streamLength -= file->APETag()->footer()->completeTagSize();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user