Very long time of parsing of tags (mp3, mp4, ...)

Scott Wheeler wheeler at kde.org
Sat Mar 5 17:13:57 CET 2011


On Mar 5, 2011, at 5:00 PM, Lukáš Lalinský wrote:

> On Sat, Mar 5, 2011 at 1:00 PM, Vladimir Skuzovatkin <skzvlad at gmail.com 
> > wrote:
>> I have another question about the attached image.
>> I found that the file size does not decrease after removal of the  
>> picture.
>> For example,
>>     mp3 file without picture have size: 2 078 346 bytes,
>>     size of jpg file to attach: 314 225 bytes,
>>     size of this mp3 file after attaching the picture: 2 390 164  
>> bytes,
>>     and size of this mp3 file after deleting of all attached  
>> pictures: 2 390
>> 164 bytes.
>> Why file size does not decrease after removal of the picture?
>
> TagLib doesn't resize the file just to reduce the size, because it's
> an expensive operations that should be ideally avoided. It uses the
> remaining space as padding. This is not possible with all audio
> formats, it does so where possible.

This is also why it wouldn't be possible to reproduce the bug if my  
initial guess was correct (though you could strip the tag and try  
again).  So, yeah, I assume that the first time it just added the  
padding and rewrote the file, which is why it took a while.

-Scott


More information about the taglib-devel mailing list