Correct the ID3v2 padding size calculation.

This commit is contained in:
Tsuda Kageyu 2015-11-13 11:44:12 +09:00
parent 091ab9dee0
commit a25e1e9f90

View File

@ -619,7 +619,7 @@ ByteVector ID3v2::Tag::render(int version) const
// Compute the amount of padding, and append that to tagData.
// TODO: Should be calculated in offset_t in taglib2.
long paddingSize = d->header.tagSize() - tagData.size();
long paddingSize = d->header.tagSize() - (tagData.size() - Header::size());
if(paddingSize <= 0) {
paddingSize = MinPaddingSize;