From b2c79bc084141ee1e84e389f26806f34f42db8d2 Mon Sep 17 00:00:00 2001 From: Tsuda Kageyu Date: Tue, 26 May 2015 12:44:25 +0900 Subject: [PATCH] MPEG: No need to get the length of an ID3v2 tag twice. --- taglib/mpeg/mpegproperties.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/taglib/mpeg/mpegproperties.cpp b/taglib/mpeg/mpegproperties.cpp index 8cf330a3..9fece404 100644 --- a/taglib/mpeg/mpegproperties.cpp +++ b/taglib/mpeg/mpegproperties.cpp @@ -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(); -- 2.40.0