From 500bdda4f2010b81fb638a26dbbc0074682989da Mon Sep 17 00:00:00 2001 From: Marcoen Hirschberg Date: Thu, 1 Oct 2009 11:50:06 +0000 Subject: add support for comments in ID3v2.2 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22868 a1c6a512-1295-4272-9138-f99709370657 --- apps/metadata/mp3.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'apps/metadata/mp3.c') diff --git a/apps/metadata/mp3.c b/apps/metadata/mp3.c index 21cdeff3fc..5eeb327125 100644 --- a/apps/metadata/mp3.c +++ b/apps/metadata/mp3.c @@ -429,6 +429,7 @@ static const struct tag_resolver taglist[] = { { "TIT1", 4, offsetof(struct mp3entry, grouping), NULL, false }, { "TT1", 3, offsetof(struct mp3entry, grouping), NULL, false }, { "COMM", 4, offsetof(struct mp3entry, comment), NULL, false }, + { "COM", 3, offsetof(struct mp3entry, comment), NULL, false }, { "TCON", 4, offsetof(struct mp3entry, genre_string), &parsegenre, false }, { "TCO", 3, offsetof(struct mp3entry, genre_string), &parsegenre, false }, { "TXXX", 4, 0, &parseuser, false }, @@ -890,7 +891,8 @@ static void setid3v2title(int fd, struct mp3entry *entry) * remove them so unicode_munge can work correctly */ - if(!memcmp( header, "COMM", 4 )) { + if((tr->tag_length == 4 && !memcmp( header, "COMM", 4)) || + (tr->tag_length == 3 && !memcmp( header, "COM", 3))) { int offset; /* ignore comments with iTunes 7 soundcheck/gapless data */ if(!strncmp(tag+4, "iTun", 4)) -- cgit