diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-03-24 01:28:16 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-04-20 20:04:08 +0200 |
| commit | cc90d3248c8e569cd521519c5c5652f16a8b23e4 (patch) | |
| tree | 8be6443a8060f4c40be258031b6476dd4c0454ae /src/verify.cc | |
| parent | 36726e62d7a6254f2d5a23dfb1ea90e73898fe2b (diff) | |
Add verify test to check for erroneous <EntryPoint> and <Duration>
tags inside <MainMarkers>
Diffstat (limited to 'src/verify.cc')
| -rw-r--r-- | src/verify.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/verify.cc b/src/verify.cc index a0c329d0..bef05a16 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -1452,6 +1452,12 @@ dcp::verify ( for (auto const& i: reel->main_markers()->get()) { markers_seen.insert (i); } + if (reel->main_markers()->entry_point()) { + notes.push_back ({VerificationNote::Type::ERROR, VerificationNote::Code::UNEXPECTED_ENTRY_POINT}); + } + if (reel->main_markers()->duration()) { + notes.push_back ({VerificationNote::Type::ERROR, VerificationNote::Code::UNEXPECTED_DURATION}); + } } fewest_closed_captions = std::min (fewest_closed_captions, reel->closed_captions().size()); @@ -1763,6 +1769,10 @@ dcp::note_to_string (VerificationNote note) return "Some closed <Text> or <Image> nodes have different vertical alignments within a <Subtitle>."; case VerificationNote::Code::INCORRECT_CLOSED_CAPTION_ORDERING: return "Some closed captions are not listed in the order of their vertical position."; + case VerificationNote::Code::UNEXPECTED_ENTRY_POINT: + return "There is an <EntryPoint> node inside a <MainMarkers>."; + case VerificationNote::Code::UNEXPECTED_DURATION: + return "There is an <Duration> node inside a <MainMarkers>."; } return ""; |
