summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-12-12 20:21:28 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-17 20:13:22 +0100
commit621b82e1a5dfeb34602f336d645c670618d6db7e (patch)
treec1ddb818231af715c6125168a51aab9fe796a2e8 /src
parentf5bd0937a730e9dbb58f955c11df41abc56e89b5 (diff)
Bv2.1 6.2.1: Check that additional subtitle languages conform to RFC 5646.
Diffstat (limited to 'src')
-rw-r--r--src/cpl.h5
-rw-r--r--src/verify.cc4
2 files changed, 9 insertions, 0 deletions
diff --git a/src/cpl.h b/src/cpl.h
index 316a5504..8d7c76e4 100644
--- a/src/cpl.h
+++ b/src/cpl.h
@@ -54,6 +54,9 @@
#include <vector>
+struct verify_invalid_sound_reel_and_additional_language;
+
+
namespace dcp {
@@ -280,6 +283,8 @@ protected:
std::string pkl_type (Standard standard) const;
private:
+ friend struct ::verify_invalid_sound_reel_and_additional_language;
+
void maybe_write_composition_metadata_asset (xmlpp::Element* node) const;
void read_composition_metadata_asset (cxml::ConstNodePtr node);
diff --git a/src/verify.cc b/src/verify.cc
index e5deb789..16233021 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -643,6 +643,10 @@ dcp::verify (
stage ("Checking CPL", cpl->file());
validate_xml (cpl->file().get(), xsd_dtd_directory, notes);
+ BOOST_FOREACH (string const& i, cpl->additional_subtitle_languages()) {
+ verify_language_tag (i, notes);
+ }
+
/* Check that the CPL's hash corresponds to the PKL */
BOOST_FOREACH (shared_ptr<PKL> i, dcp->pkls()) {
optional<string> h = i->hash(cpl->id());