diff options
author | Frank Gevaerts <frank@gevaerts.be> | 2012-09-25 16:49:36 +0200 |
---|---|---|
committer | Frank Gevaerts <frank@gevaerts.be> | 2012-09-29 15:39:55 +0200 |
commit | 341e2c46ca841c6dd68cbd6a1a07977bf5557784 (patch) | |
tree | 22e580fd8254dbef4f06384d0adc93562bb8b240 /lib/rbcodec/metadata/id3tags.c | |
parent | 270d9eaee80c96d23d249d05b6d11eca8381486e (diff) | |
download | rockbox-341e2c46ca841c6dd68cbd6a1a07977bf5557784.tar.gz rockbox-341e2c46ca841c6dd68cbd6a1a07977bf5557784.zip |
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 <mgiacomelli@gmail.com>
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
Diffstat (limited to 'lib/rbcodec/metadata/id3tags.c')
-rw-r--r-- | lib/rbcodec/metadata/id3tags.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/rbcodec/metadata/id3tags.c b/lib/rbcodec/metadata/id3tags.c index 0e27c0305b..3d1d7e4d71 100644 --- a/lib/rbcodec/metadata/id3tags.c +++ b/lib/rbcodec/metadata/id3tags.c | |||
@@ -320,6 +320,13 @@ static int parsealbumart( struct mp3entry* entry, char* tag, int bufferpos ) | |||
320 | entry->albumart.type = AA_TYPE_JPG; | 320 | entry->albumart.type = AA_TYPE_JPG; |
321 | tag += 5; | 321 | tag += 5; |
322 | } | 322 | } |
323 | else if (strcmp(tag, "jpg") == 0) | ||
324 | { | ||
325 | /* image/jpg is technically invalid, but it does occur in | ||
326 | * the wild */ | ||
327 | entry->albumart.type = AA_TYPE_JPG; | ||
328 | tag += 4; | ||
329 | } | ||
323 | else if (strcmp(tag, "png") == 0) | 330 | else if (strcmp(tag, "png") == 0) |
324 | { | 331 | { |
325 | entry->albumart.type = AA_TYPE_PNG; | 332 | entry->albumart.type = AA_TYPE_PNG; |