summaryrefslogtreecommitdiff
path: root/test/reel_asset_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-01-17 18:45:19 +0100
committerCarl Hetherington <cth@carlh.net>2022-01-17 20:16:52 +0100
commit0a5615c17edf6d9c51d9269c824d6caf71f710e5 (patch)
tree469e07adb1e3a4971b5a622f97bff59b0ed5554d /test/reel_asset_test.cc
parent59e22e6d9ff4fc180f79df64da2a27f44a982b51 (diff)
Use optional for ReelAsset _annotation_text.v1.8.6
Not only is this tag optional in Interop and SMPTE, but it would appear that if it is present but empty a DCP will not play back on Sony SRX320 / LMT3000 systems (DoM bug #2124). Here we use optional<>, as seems to make sense, and also refuse to write empty tags (instead omitting the tag entirely).
Diffstat (limited to 'test/reel_asset_test.cc')
-rw-r--r--test/reel_asset_test.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/reel_asset_test.cc b/test/reel_asset_test.cc
index 94f9c265..9dd2f8c3 100644
--- a/test/reel_asset_test.cc
+++ b/test/reel_asset_test.cc
@@ -67,7 +67,7 @@ BOOST_AUTO_TEST_CASE (reel_picture_asset_test)
dcp::ReelMonoPictureAsset pa (doc);
BOOST_CHECK_EQUAL (pa.id(), "06ac1ca7-9c46-4107-8864-a6448e24b04b");
- BOOST_CHECK_EQUAL (pa.annotation_text(), "Hello world!");
+ BOOST_CHECK_EQUAL (pa.annotation_text().get_value_or(""), "Hello world!");
BOOST_CHECK_EQUAL (pa.edit_rate(), dcp::Fraction(24, 1));
BOOST_CHECK_EQUAL (pa.intrinsic_duration(), 187048);
BOOST_CHECK_EQUAL (pa.entry_point().get(), 42L);
@@ -99,7 +99,7 @@ BOOST_AUTO_TEST_CASE (reel_smpte_subtitle_asset_test)
dcp::ReelSMPTESubtitleAsset ps (doc);
BOOST_CHECK_EQUAL (ps.id(), "8bca1489-aab1-9259-a4fd-8150abc1de12");
- BOOST_CHECK_EQUAL (ps.annotation_text(), "Goodbye world!");
+ BOOST_CHECK_EQUAL (ps.annotation_text().get_value_or(""), "Goodbye world!");
BOOST_CHECK_EQUAL (ps.edit_rate(), dcp::Fraction(25, 1));
BOOST_CHECK_EQUAL (ps.intrinsic_duration(), 1870);
BOOST_CHECK_EQUAL (ps.entry_point().get(), 0L);