summaryrefslogtreecommitdiffstats
path: root/common/tags.h
diff options
context:
space:
mode:
authorClaude Heiland-Allen <claude@mathr.co.uk>2023-10-11 12:02:32 +0100
committersfan5 <sfan5@live.de>2023-10-18 16:52:47 +0200
commita6d1c9dd0fb912891abc1aa10d35f928188641d4 (patch)
treed8ab58662bf867a8aa30668e49e70bce18b7091d /common/tags.h
parent02d009bc5c2dca3326c1a2551093c4bc3a67a6f7 (diff)
downloadmpv-a6d1c9dd0fb912891abc1aa10d35f928188641d4.tar.bz2
mpv-a6d1c9dd0fb912891abc1aa10d35f928188641d4.tar.xz
common/tags: add mp_tags_move_from_av_dictionary()
Abstracts a common pattern, in which the av dictionary is cleared immediately after copying to mp tags, so that additional tags later in the stream get appended to empty tags, instead of being appended to existing tags that were already copied.
Diffstat (limited to 'common/tags.h')
-rw-r--r--common/tags.h2
1 files changed, 2 insertions, 0 deletions
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