diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-02-23 19:40:33 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-02-23 19:40:33 +0100 |
| commit | 82d9063f46be8faa529361b5bf58a4fabad39fca (patch) | |
| tree | 39c45615ac379e2cef50d7837b7a333fde5e6ecc /src | |
| parent | b5700cf59c12164b07550d8b217b98b1616227ab (diff) | |
| parent | 8d5ebebe8fe0c233aeee68a2db3c654f7fbcaa73 (diff) | |
Merge branch 'v2.15.x' of ssh://git.carlh.net/home/carl/git/dcpomatic into v2.15.x
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/film.cc | 4 | ||||
| -rw-r--r-- | src/lib/reel_writer.cc | 25 | ||||
| -rw-r--r-- | src/lib/writer.cc | 7 |
3 files changed, 34 insertions, 2 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc index 772024902..a51ec0ad9 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -1800,6 +1800,10 @@ Film::reels () const last = t; } } + + if (!p.empty()) { + p.back().to = split_points.back(); + } break; } case ReelType::BY_LENGTH: diff --git a/src/lib/reel_writer.cc b/src/lib/reel_writer.cc index 4888a1567..136d2405e 100644 --- a/src/lib/reel_writer.cc +++ b/src/lib/reel_writer.cc @@ -790,7 +790,7 @@ ReelWriter::empty_text_asset (TextType type, optional<DCPTextTrack> track) const s->set_reel_number (raw_convert<string> (_reel_index + 1)); asset = s; } else { - shared_ptr<dcp::SMPTESubtitleAsset> s (new dcp::SMPTESubtitleAsset ()); + auto s = make_shared<dcp::SMPTESubtitleAsset>(); s->set_content_title_text (film()->name()); s->set_metadata (mxf_metadata()); if (type == TextType::OPEN_SUBTITLE && !lang.empty()) { @@ -805,6 +805,29 @@ ReelWriter::empty_text_asset (TextType type, optional<DCPTextTrack> track) const if (film()->encrypted()) { s->set_key (film()->key()); } + s->add ( + std::make_shared<dcp::SubtitleString>( + optional<std::string>(), + false, + false, + false, + dcp::Colour(), + 42, + 1.0, + dcp::Time(0, 0, 0, 0, 24), + dcp::Time(0, 0, 1, 0, 24), + 0.5, + dcp::HAlign::CENTER, + 0.5, + dcp::VAlign::CENTER, + dcp::Direction::LTR, + "", + dcp::Effect::NONE, + dcp::Colour(), + dcp::Time(), + dcp::Time() + ) + ); asset = s; } diff --git a/src/lib/writer.cc b/src/lib/writer.cc index ddb95151c..9ebdd92a3 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -642,7 +642,12 @@ Writer::finish (boost::filesystem::path output_dcp) cpl->set_main_sound_configuration (msc.to_string()); cpl->set_main_sound_sample_rate (film()->audio_frame_rate()); cpl->set_main_picture_stored_area (film()->frame_size()); - cpl->set_main_picture_active_area (film()->active_area()); + + auto active_area = film()->active_area(); + if (active_area.width > 0 && active_area.height > 0) { + /* It's not allowed to have a zero active area width or height */ + cpl->set_main_picture_active_area (active_area); + } vector<dcp::LanguageTag> sl = film()->subtitle_languages(); if (sl.size() > 1) { |
