]> granicus.if.org Git - taglib/commitdiff
Take into account the frame header version when skipping an empty frame.
authorTsuda Kageyu <tsuda.kageyu@gmail.com>
Tue, 24 Mar 2015 01:41:39 +0000 (10:41 +0900)
committerTsuda Kageyu <tsuda.kageyu@gmail.com>
Tue, 24 Mar 2015 01:41:39 +0000 (10:41 +0900)
taglib/mpeg/id3v2/id3v2tag.cpp

index 33345407a953ce10a1ce6d478b394af8c78d6d2c..f18dcebc3fae45bfdc3c9b1318b0e55049dc96ac 100644 (file)
@@ -597,7 +597,7 @@ ByteVector ID3v2::Tag::render(int version) const
     }
     if(!(*it)->header()->tagAlterPreservation()) {
       const ByteVector frameData = (*it)->render();
-      if(frameData.size() == Frame::headerSize()) {
+      if(frameData.size() == Frame::headerSize((*it)->header()->version())) {
         debug("An empty ID3v2 frame \'"
           + String((*it)->header()->frameID()) + "\' has been discarded");
         continue;