diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-01-17 18:45:19 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-01-17 18:45:21 +0100 |
| commit | 582bdd054dd5cc6e0874459d2ad426dc5669fb78 (patch) | |
| tree | 219a92f0a7d92f421eb67798da75e17574969f11 /test | |
| parent | 81c6fcba23f5c037f52c3324f4134e81d4f5d5c6 (diff) | |
Use optional for ReelAsset _annotation_text.no-empty-annotation-texts
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')
| -rw-r--r-- | test/reel_asset_test.cc | 4 |
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); |
