summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cpl.cc10
-rw-r--r--test/cpl_test.cc7
2 files changed, 13 insertions, 4 deletions
diff --git a/src/cpl.cc b/src/cpl.cc
index d73def9f..e050c885 100644
--- a/src/cpl.cc
+++ b/src/cpl.cc
@@ -297,10 +297,12 @@ CPL::read_composition_metadata_asset (cxml::ConstNodePtr node)
_main_sound_sample_rate = raw_convert<int>(sr_bits[0]);
}
- _main_picture_stored_area = dcp::Size (
- node->node_child("MainPictureStoredArea")->number_child<int>("Width"),
- node->node_child("MainPictureStoredArea")->number_child<int>("Height")
- );
+ if (_standard == dcp::Standard::SMPTE) {
+ _main_picture_stored_area = dcp::Size (
+ node->node_child("MainPictureStoredArea")->number_child<int>("Width"),
+ node->node_child("MainPictureStoredArea")->number_child<int>("Height")
+ );
+ }
_main_picture_active_area = dcp::Size (
node->node_child("MainPictureActiveArea")->number_child<int>("Width"),
diff --git a/test/cpl_test.cc b/test/cpl_test.cc
index cc51c12c..25b3306b 100644
--- a/test/cpl_test.cc
+++ b/test/cpl_test.cc
@@ -69,3 +69,10 @@ BOOST_AUTO_TEST_CASE(cpl_content_kind_test3)
}
+BOOST_AUTO_TEST_CASE(interop_cpl_with_metadata_test)
+{
+ dcp::CPL cpl(private_test / "CPL_f383c150-5021-4110-9aae-64da6c1ffbdb.xml");
+ /* The main thing is that the CPL read doesn't throw, but let's just check one thing for luck */
+ BOOST_CHECK_EQUAL(cpl.annotation_text().get_value_or(""), "EyeLeader2sec_XSN_F-133_XX-XX_MOS_4K_20230124_EYE_IOP_OV");
+}
+