There is the rare occurrence where an mp3 file will
have Id3V2 compliant padding but no Id3V2 tags. This
will cause the getupdatedPadding method to enter an
endless loop if the new tag is smaller then padding here:
while (newTagSize < size) {
newTagSize += writtenTagSize;
}
Solution is to add before the while loop a test for
writtenTagSize == 0 like this:
if (writtenTagSize == 0) {
newTagSize = sizeDiff * 2;
}
The multiplier by 2 is to make some room :)