diff options
Diffstat (limited to 'apps/metadata')
-rw-r--r-- | apps/metadata/asf.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/metadata/asf.c b/apps/metadata/asf.c index a5136b3da7..65c99f4b07 100644 --- a/apps/metadata/asf.c +++ b/apps/metadata/asf.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <inttypes.h> | 25 | #include <inttypes.h> |
26 | 26 | ||
27 | #include "id3.h" | 27 | #include "id3.h" |
28 | #include "replaygain.h" | ||
28 | #include "debug.h" | 29 | #include "debug.h" |
29 | #include "rbunicode.h" | 30 | #include "rbunicode.h" |
30 | #include "metadata_common.h" | 31 | #include "metadata_common.h" |
@@ -441,6 +442,19 @@ static int asf_parse_header(int fd, struct mp3entry* id3, | |||
441 | } else { | 442 | } else { |
442 | lseek(fd, length, SEEK_CUR); | 443 | lseek(fd, length, SEEK_CUR); |
443 | } | 444 | } |
445 | } else if (!strncmp("replaygain_", utf8buf, 11)) { | ||
446 | char* value = id3buf; | ||
447 | int buf_len = id3buf_remaining; | ||
448 | int len; | ||
449 | asf_utf16LEdecode(fd, length, &id3buf, &id3buf_remaining); | ||
450 | len = parse_replaygain(utf8buf, value, id3, | ||
451 | value, buf_len); | ||
452 | |||
453 | if (len == 0) { | ||
454 | /* Don't need to keep the value */ | ||
455 | id3buf = value; | ||
456 | id3buf_remaining = buf_len; | ||
457 | } | ||
444 | } else { | 458 | } else { |
445 | lseek(fd, length, SEEK_CUR); | 459 | lseek(fd, length, SEEK_CUR); |
446 | } | 460 | } |