From 30855638df313fd2d13739107c2ed39935a52eb3 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 13 Apr 2020 16:28:15 +0200 Subject: demux_mkv: concatenate multiple tags Instead of just picking the last tag that was encountered. The order of the tags still depends on the file order. This is probably wrong, and we should respect TargetTypeValue. But despite staring at the spec, I have no idea what the hell this should do, so fuck that. Fixes: #7604 --- demux/demux_mkv.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c index bb1125a0f2..6eb48cbeea 100644 --- a/demux/demux_mkv.c +++ b/demux/demux_mkv.c @@ -1103,8 +1103,14 @@ static void process_tags(demuxer_t *demuxer) if (dst) { for (int j = 0; j < tag.n_simple_tag; j++) { if (tag.simple_tag[j].tag_name && tag.simple_tag[j].tag_string) { - mp_tags_set_str(dst, tag.simple_tag[j].tag_name, - tag.simple_tag[j].tag_string); + char *name = tag.simple_tag[j].tag_name; + char *val = tag.simple_tag[j].tag_string; + char *old = mp_tags_get_str(dst, name); + if (old) + val = talloc_asprintf(NULL, "%s / %s", old, val); + mp_tags_set_str(dst, name, val); + if (old) + talloc_free(val); } } } -- cgit v1.2.3