aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-24 19:58:32 +0200
committerMax Kellermann <max@duempel.org>2013-10-24 20:01:14 +0200
commita57a7b1a768b661354aacf73272369b9d891864a (patch)
treefbdd3241add76dbb3e68b79adfd21affa84acfee
parent03073b366b65a93bd6d8d9148c0e0ca69f68de4d (diff)
downloadmpd-a57a7b1a768b661354aacf73272369b9d891864a.tar.gz
mpd-a57a7b1a768b661354aacf73272369b9d891864a.tar.xz
mpd-a57a7b1a768b661354aacf73272369b9d891864a.zip
decoder/opus: move code to ParseOpusTagName()
-rw-r--r--src/decoder/OpusTags.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/decoder/OpusTags.cxx b/src/decoder/OpusTags.cxx
index 71184f180..40255537d 100644
--- a/src/decoder/OpusTags.cxx
+++ b/src/decoder/OpusTags.cxx
@@ -27,6 +27,13 @@
#include <string.h>
#include <stdlib.h>
+gcc_pure
+static TagType
+ParseOpusTagName(const char *name)
+{
+ return tag_table_lookup_i(xiph_tags, name);
+}
+
static void
ScanOneOpusTag(const char *name, const char *value,
const struct tag_handler *handler, void *ctx)
@@ -34,7 +41,7 @@ ScanOneOpusTag(const char *name, const char *value,
tag_handler_invoke_pair(handler, ctx, name, value);
if (handler->tag != nullptr) {
- TagType t = tag_table_lookup_i(xiph_tags, name);
+ TagType t = ParseOpusTagName(name);
if (t != TAG_NUM_OF_ITEM_TYPES)
tag_handler_invoke_tag(handler, ctx, t, value);
}