decoder/mp4ff: remove duplicate entries in the tag name table

Reuse the function tag_name_parse_i().
This commit is contained in:
Max Kellermann 2010-05-31 08:48:41 +02:00
parent daf6e2b5da
commit 58a75f0b78
1 changed files with 5 additions and 9 deletions

View File

@ -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] = { 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_COMPOSER] = "writer",
[TAG_PERFORMER] = "band", [TAG_PERFORMER] = "band",
}; };
@ -353,7 +345,11 @@ static const char *const mp4ff_tag_names[TAG_NUM_OF_ITEM_TYPES] = {
static enum tag_type static enum tag_type
mp4ff_tag_name_parse(const char *name) 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 * static struct tag *