mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-29 07:06:59 +08:00
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
This commit is contained in:
+8
-2
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user