diff options
author | Havard Graff <havard.graff@gmail.com> | 2019-06-17 09:50:32 +0200 |
---|---|---|
committer | Havard Graff <havard.graff@gmail.com> | 2019-06-17 09:50:32 +0200 |
commit | 0257c7813b3d13081ff107070124ebc79dc7baf9 (patch) | |
tree | 4f871dbf8b9cdc3af15422b9bab92234986546b2 | |
parent | ce7e6a94067604d2cd819bcf7df5ba8c43131672 (diff) | |
download | gstreamer-0257c7813b3d13081ff107070124ebc79dc7baf9.tar.gz |
gstmeta: Optimize get_tags() by using private quark table
-rw-r--r-- | gst/gstmeta.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gst/gstmeta.c b/gst/gstmeta.c index 4bcaa7aa51..c7c1f00290 100644 --- a/gst/gstmeta.c +++ b/gst/gstmeta.c @@ -50,6 +50,7 @@ #include "gstmeta.h" #include "gstinfo.h" #include "gstutils.h" +#include "gstquark.h" static GHashTable *metainfo = NULL; static GRWLock lock; @@ -98,8 +99,7 @@ gst_meta_api_type_register (const gchar * api, const gchar ** tags) } } - g_type_set_qdata (type, g_quark_from_string ("tags"), - g_strdupv ((gchar **) tags)); + g_type_set_qdata (type, GST_QUARK (TAGS), g_strdupv ((gchar **) tags)); return type; } @@ -136,7 +136,7 @@ gst_meta_api_type_get_tags (GType api) const gchar **tags; g_return_val_if_fail (api != 0, FALSE); - tags = g_type_get_qdata (api, g_quark_from_string ("tags")); + tags = g_type_get_qdata (api, GST_QUARK (TAGS)); if (!tags[0]) return NULL; |