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);
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;