summaryrefslogtreecommitdiffstats
path: root/apps/metadata/id3tags.c
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2011-02-24 19:10:59 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2011-02-24 19:10:59 +0000
commit71ceac0b740398050af4f21b56acd5b31e2520f0 (patch)
treeda550f14a3c81f62aceae698c8b459287d201a01 /apps/metadata/id3tags.c
parent65109732230849eeb9eec2f56f9e046ad6b476c3 (diff)
downloadrockbox-71ceac0b740398050af4f21b56acd5b31e2520f0.tar.gz
rockbox-71ceac0b740398050af4f21b56acd5b31e2520f0.tar.bz2
rockbox-71ceac0b740398050af4f21b56acd5b31e2520f0.zip
FS#11964. Rework replaygain handling to save metadata buffer and binsize. Remove string representation of replaygain and use a dedicated ftoa implementation for WPS/screen info.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29388 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/metadata/id3tags.c')
-rw-r--r--apps/metadata/id3tags.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/apps/metadata/id3tags.c b/apps/metadata/id3tags.c
index 3cbebc12e3..c1d9cb2020 100644
--- a/apps/metadata/id3tags.c
+++ b/apps/metadata/id3tags.c
@@ -370,14 +370,8 @@ static int parseuser( struct mp3entry* entry, char* tag, int bufferpos )
entry->albumartist = tag;
#if CONFIG_CODEC == SWCODEC
} else {
- /* Calculate residual buffer size in bytes which can be used by
- * parse_replaygain() to save the string representation of
- * replaygain data.*/
- length = sizeof(entry->id3v2buf) - (tag - entry->id3v2buf);
-
- /* Call parse_replaygain(), returns length in bytes used by the
- * string representation of replaygain data. */
- length = parse_replaygain(tag, value, entry, tag, length);
+ /* Call parse_replaygain(). */
+ parse_replaygain(tag, value, entry);
#endif
}
}
@@ -387,12 +381,11 @@ static int parseuser( struct mp3entry* entry, char* tag, int bufferpos )
#if CONFIG_CODEC == SWCODEC
/* parse RVA2 binary data and convert to replaygain information. */
-static int parserva2( struct mp3entry* entry, char* tag, int bufferpos )
+static int parserva2( struct mp3entry* entry, char* tag, int bufferpos)
{
int desc_len = strlen(tag);
int start_pos = tag - entry->id3v2buf;
int end_pos = start_pos + desc_len + 5;
- int value_len = 0;
unsigned char* value = tag + desc_len + 1;
/* Only parse RVA2 replaygain tags if tag version == 2.4 and channel
@@ -447,11 +440,10 @@ static int parserva2( struct mp3entry* entry, char* tag, int bufferpos )
}
}
- value_len = parse_replaygain_int(album, gain, peak * 2, entry,
- tag, sizeof(entry->id3v2buf) - start_pos);
+ parse_replaygain_int(album, gain, peak * 2, entry);
}
- return start_pos + value_len;
+ return start_pos;
}
#endif