diff options
author | Max Kellermann <max@duempel.org> | 2010-06-30 21:36:15 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2010-06-30 21:36:15 +0200 |
commit | 5ebe33653c162a3a07a9a1fd71201e22fa152c6c (patch) | |
tree | 9fddf88eb13beb9ecfca9aeae91dc4eec723b108 | |
parent | 8e3eace289e2e2481221426ea9e6ab38d80be5fe (diff) | |
download | mpd-5ebe33653c162a3a07a9a1fd71201e22fa152c6c.tar.gz mpd-5ebe33653c162a3a07a9a1fd71201e22fa152c6c.tar.xz mpd-5ebe33653c162a3a07a9a1fd71201e22fa152c6c.zip |
decoder/mp4ff: remove duplicate entries in the tag name table
Reuse the function tag_name_parse_i().
-rw-r--r-- | src/decoder/mp4ff_plugin.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/decoder/mp4ff_plugin.c b/src/decoder/mp4ff_plugin.c index d94084e90..d34080493 100644 --- a/src/decoder/mp4ff_plugin.c +++ b/src/decoder/mp4ff_plugin.c @@ -341,14 +341,6 @@ mp4_decode(struct decoder *mpd_decoder, struct input_stream *input_stream) } static const char *const mp4ff_tag_names[TAG_NUM_OF_ITEM_TYPES] = { - [TAG_ITEM_TITLE] = "title", - [TAG_ITEM_ARTIST] = "artist", - [TAG_ITEM_ALBUM] = "album", - [TAG_ITEM_ALBUM_ARTIST] = "albumartist", - [TAG_ITEM_TRACK] = "track", - [TAG_ITEM_DISC] = "disc", - [TAG_ITEM_GENRE] = "genre", - [TAG_ITEM_DATE] = "date", [TAG_ITEM_COMPOSER] = "writer", [TAG_ITEM_PERFORMER] = "band", }; @@ -356,7 +348,11 @@ static const char *const mp4ff_tag_names[TAG_NUM_OF_ITEM_TYPES] = { static enum tag_type mp4ff_tag_name_parse(const char *name) { - return tag_table_lookup(mp4ff_tag_names, name); + enum tag_type type = tag_table_lookup(mp4ff_tag_names, name); + if (type == TAG_NUM_OF_ITEM_TYPES) + type = tag_name_parse_i(name); + + return type; } static struct tag * |