summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-02-04 17:21:42 +0100
committerCarl Hetherington <cth@carlh.net>2021-02-04 17:21:42 +0100
commit06330bc1cb426a6d40697057fb7d744381892a36 (patch)
treef9db8f3467bb016b7c410dd17de7b24f72714c62 /src/tools
parentbcf5e20e86afe1fb521aab8b3198d29f68b810da (diff)
Fix no subtitles/captions in the player after changing the CPL.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/dcpomatic_player.cc17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc
index 2c561d16b..6e1104b66 100644
--- a/src/tools/dcpomatic_player.cc
+++ b/src/tools/dcpomatic_player.cc
@@ -472,6 +472,19 @@ public:
private:
+ void examine_content ()
+ {
+ DCPOMATIC_ASSERT (_film);
+ auto dcp = dynamic_pointer_cast<DCPContent>(_film->content().front());
+ DCPOMATIC_ASSERT (dcp);
+ dcp->examine (_film, shared_ptr<Job>());
+
+ /* Examining content re-creates the TextContent objects, so we must re-enable them */
+ for (auto i: dcp->text) {
+ i->set_use (true);
+ }
+ }
+
bool report_errors_from_last_job (wxWindow* parent) const
{
auto jm = JobManager::instance ();
@@ -639,7 +652,7 @@ private:
try {
if (dcp) {
dcp->add_kdm (dcp::EncryptedKDM(dcp::file_to_string(wx_to_std(d->GetPath()), MAX_KDM_SIZE)));
- dcp->examine (_film, shared_ptr<Job>());
+ examine_content();
}
} catch (exception& e) {
error_dialog (this, wxString::Format (_("Could not load KDM.")), std_to_wx(e.what()));
@@ -705,7 +718,7 @@ private:
}
dcp->set_cpl ((*i)->id());
- dcp->examine (_film, shared_ptr<Job>());
+ examine_content ();
_info->triggered_update ();
}