diff options
author | TheAMM <the.actual.amm@gmail.com> | 2021-05-29 01:28:15 +0300 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2021-07-08 12:44:06 +0300 |
commit | 4d3df1c842532e3a48578ab6daef39076289c8ef (patch) | |
tree | f38668f28dca977818525416494c162f42f65b51 /demux | |
parent | f9527497c68c86b247ade965dafe362f0f43be09 (diff) | |
download | mpv-4d3df1c842532e3a48578ab6daef39076289c8ef.tar.bz2 mpv-4d3df1c842532e3a48578ab6daef39076289c8ef.tar.xz |
recorder: add support for attachments (fonts)
Though, only when the output format is matroska, to avoid muxing errors.
This is quite useful when the input has ASS subtitles, as they tend to
rely on embedded fonts.
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/demux/demux.c b/demux/demux.c index 980f4a35d6..650078d068 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -1944,9 +1944,18 @@ static struct mp_recorder *recorder_create(struct demux_internal *in, if (stream->ds->selected) MP_TARRAY_APPEND(NULL, streams, num_streams, stream); } + + struct demuxer *demuxer = in->d_thread; + struct demux_attachment **attachments = talloc_array(NULL, struct demux_attachment*, demuxer->num_attachments); + for (int n = 0; n < demuxer->num_attachments; n++) { + attachments[n] = &demuxer->attachments[n]; + } + struct mp_recorder *res = mp_recorder_create(in->d_thread->global, dst, - streams, num_streams); + streams, num_streams, + attachments, demuxer->num_attachments); talloc_free(streams); + talloc_free(attachments); return res; } |