diff options
author | John Stebbins <[email protected]> | 2019-08-02 11:41:13 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2019-08-11 15:36:40 -0700 |
commit | d62dfce98fda79ef6cd10d4089141c81fe994223 (patch) | |
tree | c07e3b2ce16a162bc9d6f2067659eedf94c3df7a /libhb/muxavformat.c | |
parent | 692ac873ccf2ea3a5091566ed9e2d027d4825eda (diff) |
add subtitle track name read/write
Works similar to audio track names.
If source has a subtitle track name, hb_subtitle_t.name is set.
To set output subtitle track name, set hb_subtitle_config_t.name.
Source track names are available in title returned by hb_title_to_dict
and hb_title_to_json in SubtitleList[].Name
In job dict it is also SubtitleList[].Name
hb_preset_job_init and hb_preset_job_init_json initialize output tracks
with the source track name.
Also adds subtitle name support to LinGui
Diffstat (limited to 'libhb/muxavformat.c')
-rw-r--r-- | libhb/muxavformat.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libhb/muxavformat.c b/libhb/muxavformat.c index e353b0e32..353e519fc 100644 --- a/libhb/muxavformat.c +++ b/libhb/muxavformat.c @@ -960,6 +960,12 @@ static int avformatInit( hb_mux_object_t * m ) { av_dict_set(&track->st->metadata, "language", lang, 0); } + if (subtitle->config.name != NULL && subtitle->config.name[0] != 0) + { + // Set subtitle track title + av_dict_set(&track->st->metadata, "title", + subtitle->config.name, 0); + } } if (need_fonts) |