summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-12-29 17:01:01 +0100
committerCarl Hetherington <cth@carlh.net>2024-12-30 14:29:26 +0100
commitae974e61591442a54738d8690bbfcf956ed2a063 (patch)
tree925a82a143ab0906c507979bce452908e51500fe /src
parentdcc552b9edfdead0736cdf54ada4a6a479e09016 (diff)
Don't give some inappropriate verification errors on encrypted assets (DoM #2916).v1.10.2
We would give some errors about the XML even though we can't read the XML.
Diffstat (limited to 'src')
-rw-r--r--src/verify.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/verify.cc b/src/verify.cc
index 68f838cf..6a4dba7d 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -689,7 +689,8 @@ verify_smpte_timed_text_asset (
{
if (asset->language()) {
verify_language_tag(context, *asset->language());
- } else {
+ } else if (asset->raw_xml()) {
+ /* Raise this error only if we can access the raw XML (i.e. the asset was unencrypted or has been decrypted) */
context.bv21_error(VerificationNote::Code::MISSING_SUBTITLE_LANGUAGE, *asset->file());
}
@@ -710,10 +711,13 @@ verify_smpte_timed_text_asset (
context.bv21_error(VerificationNote::Code::INVALID_TIMED_TEXT_FONT_SIZE_IN_BYTES, raw_convert<string>(total_size), asset->file().get());
}
- if (!asset->start_time()) {
- context.bv21_error(VerificationNote::Code::MISSING_SUBTITLE_START_TIME, asset->file().get());
- } else if (asset->start_time() != Time()) {
- context.bv21_error(VerificationNote::Code::INVALID_SUBTITLE_START_TIME, asset->file().get());
+ if (asset->raw_xml()) {
+ /* Raise these errors only if we can access the raw XML (i.e. the asset was unencrypted or has been decrypted) */
+ if (!asset->start_time()) {
+ context.bv21_error(VerificationNote::Code::MISSING_SUBTITLE_START_TIME, asset->file().get());
+ } else if (asset->start_time() != Time()) {
+ context.bv21_error(VerificationNote::Code::INVALID_SUBTITLE_START_TIME, asset->file().get());
+ }
}
if (reel_asset_duration && *reel_asset_duration != asset->intrinsic_duration()) {