aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-05-31 08:48:41 +0200
committerMax Kellermann <max@duempel.org>2010-05-31 08:48:41 +0200
commit58a75f0b786237f70a948592f8e767f1d5859b97 (patch)
tree87e94ab33041010d4d48ac992d17ab7c1859ad76 /src
parentdaf6e2b5da39e6b194760169b64f59b7d0bdbf6e (diff)
downloadmpd-58a75f0b786237f70a948592f8e767f1d5859b97.tar.gz
mpd-58a75f0b786237f70a948592f8e767f1d5859b97.tar.xz
mpd-58a75f0b786237f70a948592f8e767f1d5859b97.zip
decoder/mp4ff: remove duplicate entries in the tag name table
Reuse the function tag_name_parse_i().
Diffstat (limited to 'src')
-rw-r--r--src/decoder/mp4ff_decoder_plugin.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/decoder/mp4ff_decoder_plugin.c b/src/decoder/mp4ff_decoder_plugin.c
index 848dfe346..7866322d4 100644
--- a/src/decoder/mp4ff_decoder_plugin.c
+++ b/src/decoder/mp4ff_decoder_plugin.c
@@ -338,14 +338,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_TITLE] = "title",
- [TAG_ARTIST] = "artist",
- [TAG_ALBUM] = "album",
- [TAG_ALBUM_ARTIST] = "albumartist",
- [TAG_TRACK] = "track",
- [TAG_DISC] = "disc",
- [TAG_GENRE] = "genre",
- [TAG_DATE] = "date",
[TAG_COMPOSER] = "writer",
[TAG_PERFORMER] = "band",
};
@@ -353,7 +345,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 *