X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ffilm.cc;h=68e5c1c1fc76657ea7d2b9d99e90ab6316969c1a;hb=dd9be86db6cde0afa5da0d1d1ac43b42e05dca26;hp=4b82f1d8b37122fb1d7e098ad37d5d054b41c07c;hpb=8104c994724ef0f0c47d074e6a8a856d52dfaa7a;p=dcpomatic.git diff --git a/src/lib/film.cc b/src/lib/film.cc index 4b82f1d8b..68e5c1c1f 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -97,9 +97,9 @@ using std::back_inserter; 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 @@ -702,15 +702,17 @@ Film::read_metadata (optional path) } } - optional 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 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 (...) { + } } } }