summaryrefslogtreecommitdiff
path: root/junklib.c
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2012-10-17 17:47:42 +0200
committerGravatar waker <wakeroid@gmail.com>2012-10-17 17:47:42 +0200
commit5c48e32c20267eb92e691ee0dd543dd7b695c655 (patch)
treef0546fbc2d62c453029584f3c9e20410350fbebf /junklib.c
parentf2b4b35cf168081ecc91ab49b61ff978d175f441 (diff)
fixed apev2 parser bug which replaces all 0s with \n in binary fields;
added workaround for "cover art" fields, apparently some taggers mark them as text
Diffstat (limited to 'junklib.c')
-rw-r--r--junklib.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/junklib.c b/junklib.c
index 4e55e749..4e749eaf 100644
--- a/junklib.c
+++ b/junklib.c
@@ -1363,13 +1363,15 @@ junk_apev2_read_full (playItem_t *it, DB_apev2_tag_t *tag_store, DB_FILE *fp) {
}
value[itemsize] = 0;
- // replace 0s with \n
- uint8_t *p = value;
- while (p < value + itemsize - 1) {
- if (*p == 0) {
- *p = '\n';
+ if ((flags&6) == 0 && strncasecmp (key, "cover art ", 10)) {
+ // replace 0s with \n
+ uint8_t *p = value;
+ while (p < value + itemsize - 1) {
+ if (*p == 0) {
+ *p = '\n';
+ }
+ p++;
}
- p++;
}
junk_apev2_add_frame (it, tag_store, &tail, itemsize, itemflags, key, value);