diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-01-17 23:46:26 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-01-17 23:46:26 +0100 |
| commit | af72285fcf35c7959d0770b3d42c5243f21fd4b2 (patch) | |
| tree | b93abeeca57256e595a2b3aa166e0bd142c843b9 /test/vf_test.cc | |
| parent | 7cb1677e10b9692698ede5741c50d8c4b4144ddf (diff) | |
Fix ISDCF name when referring to OVs with subs (#2703).
Diffstat (limited to 'test/vf_test.cc')
| -rw-r--r-- | test/vf_test.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/vf_test.cc b/test/vf_test.cc index eb93dab0e..ed7f483ae 100644 --- a/test/vf_test.cc +++ b/test/vf_test.cc @@ -559,3 +559,25 @@ BOOST_AUTO_TEST_CASE(test_referencing_ov_with_missing_subtitle_in_some_reels) verify_dcp(vf->dir(vf->dcp_name()), ignore); } + +/* Test bug #2703: a VF that refers to some OV subs does not get the correct subtitle language in the ISDCF name */ +BOOST_AUTO_TEST_CASE(ov_subs_in_vf_name) +{ + auto subs = content_factory("test/data/short.srt")[0]; + auto ov = new_test_film2("ov_subs_in_vf_name_ov", { subs }); + subs->only_text()->set_language(dcp::LanguageTag("de")); + make_and_verify_dcp( + ov, + { + dcp::VerificationNote::Code::INVALID_SUBTITLE_FIRST_TEXT_TIME, + dcp::VerificationNote::Code::MISSING_CPL_METADATA + }); + + auto ov_dcp = make_shared<DCPContent>(ov->dir(ov->dcp_name())); + auto vf = new_test_film2("ov_subs_in_vf_name_vf", { ov_dcp }); + vf->set_name("foo"); + ov_dcp->set_reference_text(TextType::OPEN_SUBTITLE, true); + vf->_isdcf_date = boost::gregorian::date(2023, boost::gregorian::Jan, 18); + + BOOST_CHECK_EQUAL(vf->isdcf_name(false), "Foo_TST-1_F_XX-DE_51-HI-VI_2K_20230118_SMPTE_VF"); +} |
