diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-01-03 00:31:40 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-01-17 20:13:22 +0100 |
| commit | f11ff8d4d961d92e994ef0f9beb456aa8ec7c4cb (patch) | |
| tree | fa69fd7a044bbf02a7971da6434373eb18c83edb /src/verify.cc | |
| parent | e182156f75a74457c4452cc3bfe91d778d0d7148 (diff) | |
Bv2.1 7.2.3: Check that subtitle <StartTime> exists and is 0.
Diffstat (limited to 'src/verify.cc')
| -rw-r--r-- | src/verify.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/verify.cc b/src/verify.cc index 0b7def3c..bbae1ba4 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -704,6 +704,18 @@ verify_subtitle_asset ( ) ); } + + if (!smpte->start_time()) { + notes.push_back ( + VerificationNote( + VerificationNote::VERIFY_BV21_ERROR, VerificationNote::MISSING_SUBTITLE_START_TIME, *asset->file()) + ); + } else if (smpte->start_time() != dcp::Time()) { + notes.push_back ( + VerificationNote( + VerificationNote::VERIFY_BV21_ERROR, VerificationNote::SUBTITLE_START_TIME_NON_ZERO, *asset->file()) + ); + } } } @@ -912,6 +924,10 @@ dcp::note_to_string (dcp::VerificationNote note) return String::compose("The XML for a SMPTE subtitle asset has no <Language> tag, which is required by Bv2.1", note.file()->filename()); case dcp::VerificationNote::SUBTITLE_LANGUAGES_DIFFER: return String::compose("Some subtitle assets have different <Language> tags than others", note.file()->filename()); + case dcp::VerificationNote::MISSING_SUBTITLE_START_TIME: + return String::compose("The XML for a SMPTE subtitle asset has no <StartTime> tag, which is required by Bv2.1", note.file()->filename()); + case dcp::VerificationNote::SUBTITLE_START_TIME_NON_ZERO: + return String::compose("The XML for a SMPTE subtitle asset has a non-zero <StartTime> tag, which is disallowed by Bv2.1", note.file()->filename()); } return ""; |
