diff options
author | wm4 <wm4@nowhere> | 2014-07-05 16:45:56 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-07-05 17:07:14 +0200 |
commit | 7e209185f1fa804dda4474de7246a4d85418315e (patch) | |
tree | ee709c1236297a8757186907f8236315d979d02e /common/tags.c | |
parent | 58880c00eeca254a5391dd61a920081bb16bc2c1 (diff) | |
download | mpv-7e209185f1fa804dda4474de7246a4d85418315e.tar.bz2 mpv-7e209185f1fa804dda4474de7246a4d85418315e.tar.xz |
demux, stream: change metadata notification
(Again.)
This time, we simply make it event-based, as it should be. This is done
for both demuxer metadata and stream metadata.
For some ogg-over-icy streams, 2 updates are reported on stream start.
This is because libavformat reports an update right on start, while
including the same info in the "static" metadata. I don't know if that's
a bug or a feature.
Diffstat (limited to 'common/tags.c')
-rw-r--r-- | common/tags.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/tags.c b/common/tags.c index f709cf0d5a..03765272df 100644 --- a/common/tags.c +++ b/common/tags.c @@ -61,6 +61,12 @@ void mp_tags_clear(struct mp_tags *tags) talloc_free_children(tags); } +void mp_tags_merge(struct mp_tags *tags, struct mp_tags *src) +{ + for (int n = 0; n < src->num_keys; n++) + mp_tags_set_str(tags, src->keys[n], src->values[n]); +} + void mp_tags_copy_from_av_dictionary(struct mp_tags *tags, struct AVDictionary *av_dict) { |