On Sat, Oct 30, 2004 at 04:24:57PM +0200, Linus Walleij wrote:
Sam, first: good work! This is much needed.
On Sat, 30 Oct 2004, Sam Clegg wrote:
It works for me and I would like to get it included in libid3tag as the current version will silently fail to write updated tags that are not the same size as the original.
Don't you mean taht it will fail of the updated tags are larger than the original?
No, the current code also fails if they are smaller, although in practice I have never seen libi3dtag shrink a tag.
I found a way to work around it by adding some unused padding zeroes to the tag. (This is mentioned in the ID3v2 spec.) As long as the modified tag do not exceed the padding buffer, everything works OK.
Yes but we need to handle the case when the tag grows. Think embedded JPEG images.
Will the patch also handle adding tags to files that do not have any tag at all?
I think this would require API changes. This patch doesn't do that but I would like to see the file interface handle adding and removing v2 and v2 tags.
Will it also handle adding ID3v1 tags if such do not exist?
IIRC think you cas do this already.