diff options
author | wm4 <wm4@nowhere> | 2014-02-06 13:42:30 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-02-06 13:42:30 +0100 |
commit | 39b932042bfbff91006675a8366afe7789c985a1 (patch) | |
tree | 7d750abbcbd7cc8bc5bec91eb288d89f76778d28 /demux/demux.c | |
parent | eb1ec14b67462c6a1420e2fa67b8213cad83b297 (diff) | |
download | mpv-39b932042bfbff91006675a8366afe7789c985a1.tar.bz2 mpv-39b932042bfbff91006675a8366afe7789c985a1.tar.xz |
demux_lavf: clear metadata on update, instead of merging it
Assume a metadata update is a full update. Clear the previous metadata,
so that tags which existed only in the previous metadata are removed.
Diffstat (limited to 'demux/demux.c')
-rw-r--r-- | demux/demux.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/demux/demux.c b/demux/demux.c index ceaa9db79c..63a1c16690 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -713,6 +713,12 @@ char *mp_tags_get_bstr(struct mp_tags *tags, bstr key) return NULL; } +void mp_tags_clear(struct mp_tags *tags) +{ + *tags = (struct mp_tags){0}; + talloc_free_children(tags); +} + int demux_info_add(demuxer_t *demuxer, const char *opt, const char *param) { return demux_info_add_bstr(demuxer, bstr0(opt), bstr0(param)); |