if (film()->interop()) {
auto s = make_shared<dcp::InteropTextAsset>();
s->set_movie_title (film()->name());
- if (type == TextType::OPEN_SUBTITLE) {
+ if (is_open(type)) {
s->set_language (lang.first ? lang.first->to_string() : "Unknown");
} else if (track->language) {
s->set_language (track->language->to_string());
auto s = make_shared<dcp::SMPTETextAsset>();
s->set_content_title_text (film()->name());
s->set_metadata (mxf_metadata());
- if (type == TextType::OPEN_SUBTITLE && lang.first) {
+ if (is_open(type) && lang.first) {
s->set_language (*lang.first);
} else if (track && track->language) {
s->set_language (dcp::LanguageTag(track->language->to_string()));
auto film = new_test_film("basic_open_caption_test", { content });
content->text[0]->set_type(TextType::OPEN_CAPTION);
+ content->text[0]->set_language(dcp::LanguageTag("de"));
make_and_verify_dcp(
film,
{
dcp::VerificationNote::Code::MISSING_CPL_METADATA,
- dcp::VerificationNote::Code::INVALID_SUBTITLE_FIRST_TEXT_TIME,
- dcp::VerificationNote::Code::MISSING_SUBTITLE_LANGUAGE
+ dcp::VerificationNote::Code::INVALID_SUBTITLE_FIRST_TEXT_TIME
}
);