From 4c0e03e857066a8241bfb286412f76a8c52d2760 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 15 Jan 2023 23:13:49 +0100 Subject: Check that Interop subtitle files have at least one subtitle. It was reported on the forum that files without any or tags fail validation on EasyDCP 3.0.1 and crash Qubemaster Pro 3.0.15. --- test/data/subs4.xml | 8 ++++++++ test/verify_test.cc | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 test/data/subs4.xml (limited to 'test') diff --git a/test/data/subs4.xml b/test/data/subs4.xml new file mode 100644 index 00000000..5aea4c10 --- /dev/null +++ b/test/data/subs4.xml @@ -0,0 +1,8 @@ + + + cab5c268-222b-41d2-88ae-6d6999441b17 + Movie Title + 1 + French + + diff --git a/test/verify_test.cc b/test/verify_test.cc index 652bf12d..34dc79bc 100644 --- a/test/verify_test.cc +++ b/test/verify_test.cc @@ -806,6 +806,25 @@ BOOST_AUTO_TEST_CASE (verify_invalid_interop_subtitles) } +BOOST_AUTO_TEST_CASE(verify_interop_subtitle_asset_with_no_subtitles) +{ + path const dir("build/test/verify_interop_subtitle_asset_with_no_subtitles"); + prepare_directory(dir); + copy_file("test/data/subs4.xml", dir / "subs.xml"); + auto asset = make_shared(dir / "subs.xml"); + auto reel_asset = make_shared(asset, dcp::Fraction(24, 1), 16 * 24, 0); + write_dcp_with_single_asset(dir, reel_asset, dcp::Standard::INTEROP); + + check_verify_result ( + { dir }, + { + { dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_STANDARD }, + { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISSING_SUBTITLE, asset->id(), boost::filesystem::canonical(asset->file().get()) }, + }); + +} + + BOOST_AUTO_TEST_CASE (verify_valid_smpte_subtitles) { path const dir("build/test/verify_valid_smpte_subtitles"); -- cgit v1.2.3