summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-02-21 20:27:58 +0100
committerCarl Hetherington <cth@carlh.net>2021-02-21 20:27:58 +0100
commit973ca55183bff3f9bda583a71595c7b345ee3979 (patch)
tree99d3c97e154cd5e6f0a6af8844599f21a0d6d56c
parentb59d8e2010deac24fc4501526107115c567e8ba4 (diff)
Don't write active picture area with zero width or height as it makes verification fail.
-rw-r--r--src/lib/writer.cc7
1 files changed, 6 insertions, 1 deletions
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) {