mirror of https://github.com/mpv-player/mpv
demux_mkv: copy attachments (fonts) from ordered chapter sources
They might be needed for rendering subs from those sources. Fixes #6009.
This commit is contained in:
parent
cc38035841
commit
a38aa74454
|
@ -297,6 +297,16 @@ static void find_ordered_chapter_sources(struct tl_ctx *ctx)
|
|||
ctx->num_sources = j;
|
||||
}
|
||||
|
||||
// Copy attachments from referenced sources so fonts are loaded for sub
|
||||
// rendering.
|
||||
for (int i = 1; i < ctx->num_sources; i++) {
|
||||
for (int j = 0; j < ctx->sources[i]->num_attachments; j++) {
|
||||
struct demux_attachment *att = &ctx->sources[i]->attachments[j];
|
||||
demuxer_add_attachment(ctx->demuxer, att->name, att->type,
|
||||
att->data, att->data_size);
|
||||
}
|
||||
}
|
||||
|
||||
talloc_free(tmp);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue