summaryrefslogtreecommitdiff
path: root/apps/metadata/mp3.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-11-26 18:02:50 +0000
committerThomas Martitz <kugel@rockbox.org>2010-11-26 18:02:50 +0000
commit9393e4c24b4c18d7fe1fa8313008f30370cb726e (patch)
tree746e9210b2144c96b6d58a3f858ccdcb358d854e /apps/metadata/mp3.c
parent756c59a534d2e26b0e62fb94a326182f376b8a97 (diff)
downloadrockbox-9393e4c24b4c18d7fe1fa8313008f30370cb726e.tar.gz
rockbox-9393e4c24b4c18d7fe1fa8313008f30370cb726e.zip
Change how all the metadata parsers are read from a giant swich/case to function pointers via array index. Also unify the api.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28672 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/metadata/mp3.c')
-rw-r--r--apps/metadata/mp3.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/apps/metadata/mp3.c b/apps/metadata/mp3.c
index c65fb39cd8..9309242604 100644
--- a/apps/metadata/mp3.c
+++ b/apps/metadata/mp3.c
@@ -163,14 +163,8 @@ static int getsonglength(int fd, struct mp3entry *entry)
163 * about an MP3 file and updates it's entry accordingly. 163 * about an MP3 file and updates it's entry accordingly.
164 * 164 *
165 Note, that this returns true for successful, false for error! */ 165 Note, that this returns true for successful, false for error! */
166bool get_mp3_metadata(int fd, struct mp3entry *entry, const char *filename) 166bool get_mp3_metadata(int fd, struct mp3entry *entry)
167{ 167{
168#if CONFIG_CODEC != SWCODEC
169 memset(entry, 0, sizeof(struct mp3entry));
170#endif
171
172 strlcpy(entry->path, filename, sizeof(entry->path));
173
174 entry->title = NULL; 168 entry->title = NULL;
175 entry->filesize = filesize(fd); 169 entry->filesize = filesize(fd);
176 entry->id3v2len = getid3v2len(fd); 170 entry->id3v2len = getid3v2len(fd);