summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-04-27 15:13:42 +0100
committerCarl Hetherington <cth@carlh.net>2018-04-27 15:13:42 +0100
commitdd9f4f7e9511f8f830ec05d1b60c475c6b2d71e0 (patch)
treea2035eacaa9dc587ed119f2785dff9589db05aff /src/tools
parent565490c24a46d0aa941f75cf2a03b195246008b4 (diff)
Fix incorrect container size when loading a VF/OV combination into the player.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/dcpomatic_player.cc30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc
index 19768e292..2fe9aca8b 100644
--- a/src/tools/dcpomatic_player.cc
+++ b/src/tools/dcpomatic_player.cc
@@ -213,19 +213,12 @@ public:
return;
}
- if (dcp->subtitle) {
- dcp->subtitle->set_use (true);
- }
+ setup_from_dcp (dcp);
if (dcp->three_d()) {
_film->set_three_d (true);
}
- Ratio const * r = Ratio::nearest_from_ratio(dcp->video->size().ratio());
- if (r) {
- _film->set_container(r);
- }
-
_viewer->set_film (_film);
_viewer->set_position (DCPTime ());
_info->triggered_update ();
@@ -364,10 +357,7 @@ private:
DCPOMATIC_ASSERT (dcp);
dcp->add_ov (wx_to_std(c->GetPath()));
dcp->examine (shared_ptr<Job>());
- /* Maybe we just gained some subtitles */
- if (dcp->subtitle) {
- dcp->subtitle->set_use (true);
- }
+ setup_from_dcp (dcp);
}
c->Destroy ();
@@ -594,6 +584,22 @@ private:
_viewer->forward_frame ();
}
+private:
+
+ void setup_from_dcp (shared_ptr<DCPContent> dcp)
+ {
+ if (dcp->subtitle) {
+ dcp->subtitle->set_use (true);
+ }
+
+ if (dcp->video) {
+ Ratio const * r = Ratio::nearest_from_ratio(dcp->video->size().ratio());
+ if (r) {
+ _film->set_container(r);
+ }
+ }
+ }
+
bool _update_news_requested;
PlayerInformation* _info;
wxPreferencesEditor* _config_dialog;