This was based on a misread of the header: at present there is no
non-static size() method, so removing the argument makes the behavior
incorrect.
if(version > 3 && (tagHeader->unsynchronisation() || header->unsynchronisation())) {
// Data lengths are not part of the encoded data, but since they are synch-safe
// integers they will be never actually encoded.
- ByteVector frameData = data.mid(header->size(), header->frameSize());
+ ByteVector frameData = data.mid(Frame::Header::size(version), header->frameSize());
frameData = SynchData::decode(frameData);
data = data.mid(0, Frame::Header::size(version)) + frameData;
}