decoder/mp4ff: moved code to mp4ff_tag_name_parse()

This commit is contained in:
Max Kellermann 2010-05-31 08:47:59 +02:00
parent 71da5b026c
commit daf6e2b5da
1 changed files with 7 additions and 1 deletions

View File

@ -350,6 +350,12 @@ static const char *const mp4ff_tag_names[TAG_NUM_OF_ITEM_TYPES] = {
[TAG_PERFORMER] = "band", [TAG_PERFORMER] = "band",
}; };
static enum tag_type
mp4ff_tag_name_parse(const char *name)
{
return tag_table_lookup(mp4ff_tag_names, name);
}
static struct tag * static struct tag *
mp4_stream_tag(struct input_stream *is) mp4_stream_tag(struct input_stream *is)
{ {
@ -395,7 +401,7 @@ mp4_stream_tag(struct input_stream *is)
mp4ff_meta_get_by_index(mp4fh, i, &item, &value); mp4ff_meta_get_by_index(mp4fh, i, &item, &value);
enum tag_type type = tag_table_lookup(mp4ff_tag_names, item); enum tag_type type = mp4ff_tag_name_parse(item);
if (type != TAG_NUM_OF_ITEM_TYPES) if (type != TAG_NUM_OF_ITEM_TYPES)
tag_add_item(ret, type, value); tag_add_item(ret, type, value);