summaryrefslogtreecommitdiff
path: root/src/cpl.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-12-16 00:01:21 +0100
committerCarl Hetherington <cth@carlh.net>2022-12-16 00:01:21 +0100
commit9fed36f5ce0531ab7dc541829d959f4e040034f3 (patch)
tree722c3eae0149dd8f263b7ec87a29477812411d84 /src/cpl.cc
parent16ff53a37012b52b4ccc39d87a383e10f7e5cbb8 (diff)
Throw exceptions when setting odd values for picture active area.
Diffstat (limited to 'src/cpl.cc')
-rw-r--r--src/cpl.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/cpl.cc b/src/cpl.cc
index ee1817fc..74f6f0bd 100644
--- a/src/cpl.cc
+++ b/src/cpl.cc
@@ -747,3 +747,19 @@ CPL::set_additional_subtitle_languages (vector<dcp::LanguageTag> const& langs)
_additional_subtitle_languages.push_back (i.to_string());
}
}
+
+
+void
+CPL::set_main_picture_active_area(dcp::Size area)
+{
+ if (area.width % 2) {
+ throw BadSettingError("Main picture active area width is not a multiple of 2");
+ }
+
+ if (area.height % 2) {
+ throw BadSettingError("Main picture active area height is not a multiple of 2");
+ }
+
+ _main_picture_active_area = area;
+}
+