summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2026-04-16 20:30:32 +0200
committerCarl Hetherington <cth@carlh.net>2026-04-16 20:30:32 +0200
commit2fc3908ca3d7a01aee43db7e28f99fb6ec553a68 (patch)
treefac829a2fb3728026a49a9f45f268875a32888fe
parent0f42191dba5596c853ad37714c623fa6bc294d95 (diff)
Preserve DCP subtitle settings when re-examining (#3152).
-rw-r--r--src/lib/dcp_subtitle_content.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/dcp_subtitle_content.cc b/src/lib/dcp_subtitle_content.cc
index f1ddc0a5d..ac8c4245b 100644
--- a/src/lib/dcp_subtitle_content.cc
+++ b/src/lib/dcp_subtitle_content.cc
@@ -47,6 +47,8 @@ DCPSubtitleContent::DCPSubtitleContent(boost::filesystem::path path)
: Content(path)
{
text = vector<shared_ptr<TextContent>>{make_shared<TextContent>(this, TextType::OPEN_SUBTITLE, TextType::OPEN_SUBTITLE)};
+ /* Default to turning these subtitles on */
+ only_text()->set_use(true);
}
DCPSubtitleContent::DCPSubtitleContent(cxml::ConstNodePtr node, boost::optional<boost::filesystem::path> film_directory, int version)
@@ -70,14 +72,10 @@ DCPSubtitleContent::examine(shared_ptr<const Film> film, shared_ptr<Job> job, bo
boost::mutex::scoped_lock lm(_mutex);
- text = vector<shared_ptr<TextContent>>{make_shared<TextContent>(this, TextType::OPEN_SUBTITLE, TextType::OPEN_SUBTITLE)};
-
- /* Default to turning these subtitles on */
- only_text()->set_use(true);
-
_length = ContentTime::from_seconds(subtitle_asset->latest_text_out().as_seconds());
subtitle_asset->fix_empty_font_ids();
+ only_text()->clear_fonts();
add_fonts(only_text(), subtitle_asset);
}