summaryrefslogtreecommitdiff
path: root/src/verify.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-05-27 14:22:48 +0200
committerCarl Hetherington <cth@carlh.net>2021-05-27 14:25:17 +0200
commitdd672d926e3b88cbe42b0778fda397d9e858b592 (patch)
tree1f30fe44ed09b2a588f87f17c8a58d2a7e00eb8f /src/verify.cc
parenta6a1294944d4ce02cbb429ca1aec07ca78d79a88 (diff)
Make similar changes to the previous commit for _xml_id.
This is also unavailable if the asset is encrypted.
Diffstat (limited to 'src/verify.cc')
-rw-r--r--src/verify.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/verify.cc b/src/verify.cc
index 40f7c0b6..5550a67f 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -703,12 +703,17 @@ verify_smpte_subtitle_asset (
}
DCP_ASSERT (asset->resource_id());
- if (asset->resource_id().get() != asset->xml_id()) {
- notes.push_back ({ VerificationNote::Type::BV21_ERROR, VerificationNote::Code::MISMATCHED_TIMED_TEXT_RESOURCE_ID });
- }
+ auto xml_id = asset->xml_id();
+ if (xml_id) {
+ if (asset->resource_id().get() != xml_id) {
+ notes.push_back ({ VerificationNote::Type::BV21_ERROR, VerificationNote::Code::MISMATCHED_TIMED_TEXT_RESOURCE_ID });
+ }
- if (asset->id() == asset->resource_id().get() || asset->id() == asset->xml_id()) {
- notes.push_back ({ VerificationNote::Type::BV21_ERROR, VerificationNote::Code::INCORRECT_TIMED_TEXT_ASSET_ID });
+ if (asset->id() == asset->resource_id().get() || asset->id() == xml_id) {
+ notes.push_back ({ VerificationNote::Type::BV21_ERROR, VerificationNote::Code::INCORRECT_TIMED_TEXT_ASSET_ID });
+ }
+ } else {
+ notes.push_back ({VerificationNote::Type::WARNING, VerificationNote::Code::MISSED_CHECK_OF_ENCRYPTED});
}
}