summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/tags.c7
-rw-r--r--common/tags.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/common/tags.c b/common/tags.c
index f7e85ace3d..43f557dd6c 100644
--- a/common/tags.c
+++ b/common/tags.c
@@ -142,3 +142,10 @@ void mp_tags_copy_from_av_dictionary(struct mp_tags *tags,
while ((entry = av_dict_get(av_dict, "", entry, AV_DICT_IGNORE_SUFFIX)))
mp_tags_set_str(tags, entry->key, entry->value);
}
+
+void mp_tags_move_from_av_dictionary(struct mp_tags *tags,
+ struct AVDictionary **av_dict_ptr)
+{
+ mp_tags_copy_from_av_dictionary(tags, *av_dict_ptr);
+ av_dict_free(av_dict_ptr);
+}
diff --git a/common/tags.h b/common/tags.h
index beb8388df1..e7eb4b32a2 100644
--- a/common/tags.h
+++ b/common/tags.h
@@ -25,5 +25,7 @@ void mp_tags_merge(struct mp_tags *tags, struct mp_tags *src);
struct AVDictionary;
void mp_tags_copy_from_av_dictionary(struct mp_tags *tags,
struct AVDictionary *av_dict);
+void mp_tags_move_from_av_dictionary(struct mp_tags *tags,
+ struct AVDictionary **av_dict_ptr);
#endif