From b8e82a7775e3f635192feff579caef745c3b0782 Mon Sep 17 00:00:00 2001 From: Tsuda Kageyu Date: Sat, 9 Jan 2016 10:13:07 +0900 Subject: [PATCH] Amend an outdated comment. --- taglib/mpeg/mpegheader.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/taglib/mpeg/mpegheader.cpp b/taglib/mpeg/mpegheader.cpp index 1b93560b..e678f15b 100644 --- a/taglib/mpeg/mpegheader.cpp +++ b/taglib/mpeg/mpegheader.cpp @@ -299,12 +299,14 @@ void MPEG::Header::parse(File *file, long offset, bool checkLength) if(d->isPadded) d->frameLength += paddingSize[layerIndex]; - // Check if the frame length has been calculated correctly, or the next frame - // synch bytes are right next to the end of this frame. + if(checkLength) { - // We read some extra bytes to be a bit tolerant. + // Check if the frame length has been calculated correctly, or the next frame + // header is right next to the end of this frame. - if(checkLength) { + // The MPEG versions, layers and sample rates of the two frames should be + // consistent. Otherwise, we assume that either or both of the frames are + // broken. file->seek(offset + d->frameLength); const ByteVector nextData = file->readBlock(4); @@ -314,10 +316,6 @@ void MPEG::Header::parse(File *file, long offset, bool checkLength) return; } - // The MPEG versions, layers and sample rates of the two frames should be - // consistent. Otherwise, we assume that either or both of the frames are - // broken. - const unsigned int HeaderMask = 0xfffe0c00; const unsigned int header = data.toUInt(0, true) & HeaderMask; -- 2.40.0