using std::map;
using std::exception;
using std::find;
-using boost::shared_ptr;
-using boost::weak_ptr;
-using boost::dynamic_pointer_cast;
+using std::shared_ptr;
+using std::weak_ptr;
+using std::dynamic_pointer_cast;
using boost::optional;
using boost::is_any_of;
#if BOOST_VERSION >= 106100
}
}
- optional<string> isdcf_language = f.node_child("ISDCFMetadata")->optional_string_child("SubtitleLanguage");
- if (isdcf_language && !found_language) {
- try {
- found_language = dcp::LanguageTag(*isdcf_language);
- } catch (...) {
+ if (_state_version >= 9) {
+ optional<string> isdcf_language = f.node_child("ISDCFMetadata")->optional_string_child("SubtitleLanguage");
+ if (isdcf_language && !found_language) {
try {
- found_language = dcp::LanguageTag(boost::algorithm::to_lower_copy(*isdcf_language));
+ found_language = dcp::LanguageTag(*isdcf_language);
} catch (...) {
+ try {
+ found_language = dcp::LanguageTag(boost::algorithm::to_lower_copy(*isdcf_language));
+ } catch (...) {
+ }
}
}
}
d->set_reference_audio(false);
change_made = true;
}
+ if (d->reference_text(TEXT_OPEN_SUBTITLE) && !d->can_reference_text(shared_from_this(), TEXT_OPEN_SUBTITLE, why_not)) {
+ d->set_reference_text(TEXT_OPEN_SUBTITLE, false);
+ change_made = true;
+ }
+ if (d->reference_text(TEXT_CLOSED_CAPTION) && !d->can_reference_text(shared_from_this(), TEXT_CLOSED_CAPTION, why_not)) {
+ d->set_reference_text(TEXT_CLOSED_CAPTION, false);
+ change_made = true;
+ }
}
if (change_made) {