summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rbcodec/metadata/asf.c4
-rw-r--r--lib/rbcodec/metadata/id3tags.c7
2 files changed, 11 insertions, 0 deletions
diff --git a/lib/rbcodec/metadata/asf.c b/lib/rbcodec/metadata/asf.c
index b88b8e7..469a573 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 {
diff --git a/lib/rbcodec/metadata/id3tags.c b/lib/rbcodec/metadata/id3tags.c
index 0e27c03..3d1d7e4 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 )
entry->albumart.type = AA_TYPE_JPG;
tag += 5;
}
+ else if (strcmp(tag, "jpg") == 0)
+ {
+ /* image/jpg is technically invalid, but it does occur in
+ * the wild */
+ entry->albumart.type = AA_TYPE_JPG;
+ tag += 4;
+ }
else if (strcmp(tag, "png") == 0)
{
entry->albumart.type = AA_TYPE_PNG;