diff options
author | Philip Sequeira <phsequei@gmail.com> | 2018-07-25 21:16:59 -0400 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2019-06-12 23:34:47 +0300 |
commit | a38aa74454ba8475463510dc2de8162f39565d11 (patch) | |
tree | 3bc45adc6856c76c3677537fd236c0829ed00fa5 /demux | |
parent | cc38035841692780883f9cec274617108c57670c (diff) | |
download | mpv-a38aa74454ba8475463510dc2de8162f39565d11.tar.bz2 mpv-a38aa74454ba8475463510dc2de8162f39565d11.tar.xz |
demux_mkv: copy attachments (fonts) from ordered chapter sources
They might be needed for rendering subs from those sources.
Fixes #6009.
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux_mkv_timeline.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/demux/demux_mkv_timeline.c b/demux/demux_mkv_timeline.c index 69cf26e681..1408ddf8f5 100644 --- a/demux/demux_mkv_timeline.c +++ b/demux/demux_mkv_timeline.c @@ -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); } |