]> granicus.if.org Git - taglib/commitdiff
Revert switch to other static size method
authorScott Wheeler <scott@directededge.com>
Tue, 10 Sep 2019 22:58:18 +0000 (00:58 +0200)
committerScott Wheeler <scott@directededge.com>
Tue, 10 Sep 2019 22:58:18 +0000 (00:58 +0200)
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.

taglib/mpeg/id3v2/id3v2framefactory.cpp

index be07754ac0784203fb7190d365ffdd27eb05d87b..ad5983320eae7de6f969396c17e2769d692d05f9 100644 (file)
@@ -169,7 +169,7 @@ Frame *FrameFactory::createFrame(const ByteVector &origData, const Header *tagHe
   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;
   }