summaryrefslogtreecommitdiffstats
path: root/common/tags.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/tags.c')
-rw-r--r--common/tags.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/common/tags.c b/common/tags.c
index f7e85ace3d..67e428766a 100644
--- a/common/tags.c
+++ b/common/tags.c
@@ -17,9 +17,9 @@
#include <stddef.h>
#include <limits.h>
-#include <strings.h>
#include <assert.h>
#include <libavutil/dict.h>
+#include "common.h"
#include "tags.h"
#include "misc/bstr.h"
@@ -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);
+}