summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2011-11-28 20:44:35 +0100
committerGravatar waker <wakeroid@gmail.com>2011-11-28 20:44:35 +0100
commitc1f85294a6b8b9a2c4f03cf7a07ee51f020a8bee (patch)
treee1308eefa39fc8cf9db8ab18650bcd3e8db8d939 /plugins
parenta18dbfcbb883f57261c0e665736aa3f763ec5056 (diff)
fixed embedded covers in id3v2.4
Diffstat (limited to 'plugins')
-rw-r--r--plugins/artwork/artwork.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/artwork/artwork.c b/plugins/artwork/artwork.c
index 7844faae..a604b87e 100644
--- a/plugins/artwork/artwork.c
+++ b/plugins/artwork/artwork.c
@@ -832,17 +832,20 @@ fetcher_thread (void *none)
if (!res) {
for (DB_id3v2_frame_t *f = tag.frames; f; f = f->next) {
if (!strcmp (f->id, "APIC")) {
-
if (f->size < 20) {
trace ("artwork: id3v2 APIC frame is too small\n");
continue;
}
uint8_t *data = f->data;
+ if (tag.version[0] == 4) {
+ // skip size
+ data += 4;
+ }
uint8_t *end = f->data + f->size;
int enc = *data;
data++; // enc
// mime-type must always be ASCII - hence enc is 0 here
- uint8_t *mime_end = id3v2_skip_str (0, data, end);
+ uint8_t *mime_end = id3v2_skip_str (enc, data, end);
if (!mime_end) {
trace ("artwork: corrupted id3v2 APIC frame\n");
continue;