From 341e2c46ca841c6dd68cbd6a1a07977bf5557784 Mon Sep 17 00:00:00 2001 From: Frank Gevaerts Date: Tue, 25 Sep 2012 16:49:36 +0200 Subject: Support technically invalid image/jpg mimetype in tags. Although the mimetype for jpeg is clearly image/jpeg, many tagging applications seem to use image/jpg, so we'll support that too. Change-Id: Icb9063fd5a9d8aea169eaa7f74ac52b72603d148 Reviewed-on: http://gerrit.rockbox.org/318 Reviewed-by: Michael Giacomelli Reviewed-by: Thomas Martitz --- lib/rbcodec/metadata/asf.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/rbcodec/metadata/asf.c') diff --git a/lib/rbcodec/metadata/asf.c b/lib/rbcodec/metadata/asf.c index b88b8e77fe..469a5739d2 100644 --- a/lib/rbcodec/metadata/asf.c +++ b/lib/rbcodec/metadata/asf.c @@ -493,6 +493,10 @@ static int asf_parse_header(int fd, struct mp3entry* id3, lseek(fd, strlength-32, SEEK_CUR); if (!strcmp("image/jpeg", utf8buf)) { id3->albumart.type = AA_TYPE_JPG; + } else if (!strcmp("image/jpg", utf8buf)) { + /* image/jpg is technically invalid, + * but it does occur in the wild */ + id3->albumart.type = AA_TYPE_JPG; } else if (!strcmp("image/png", utf8buf)) { id3->albumart.type = AA_TYPE_PNG; } else { -- cgit v1.2.3