diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-12-16 00:19:00 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-12-16 10:51:34 +0100 |
| commit | 11cc2c64b148201fbf962c68c21af9f5f706c257 (patch) | |
| tree | f2e46a0aebcb2260ea254142ab500a211f43b901 /src | |
| parent | 0e76d77bd43c528ef27ef0c4ee27aa5cb509794e (diff) | |
Make sure main picture active area values are even (#2392).
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/writer.cc | 4 | ||||
| -rw-r--r-- | src/wx/verify_dcp_dialog.cc | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 2dd46f0b2..2e732c280 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -676,8 +676,8 @@ Writer::finish (boost::filesystem::path output_dcp) 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); + /* It's not allowed to have a zero active area width or height, and the sizes must be multiples of 2 */ + cpl->set_main_picture_active_area({ active_area.width & ~1, active_area.height & ~1}); } auto sl = film()->subtitle_languages().second; diff --git a/src/wx/verify_dcp_dialog.cc b/src/wx/verify_dcp_dialog.cc index bb51baeac..bd36334cd 100644 --- a/src/wx/verify_dcp_dialog.cc +++ b/src/wx/verify_dcp_dialog.cc @@ -380,6 +380,9 @@ VerifyDCPDialog::VerifyDCPDialog (wxWindow* parent, shared_ptr<VerifyDCPJob> job case dcp::VerificationNote::Code::INVALID_CONTENT_KIND: add(i, _("An invalid <ContentKind> %n has been used.")); break; + case dcp::VerificationNote::Code::INVALID_MAIN_PICTURE_ACTIVE_AREA: + add(i, _("The <MainPictureActiveArea> is either not a multiple of 2, or is bigger than an asset.")); + break; } } |
