diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-06-08 13:12:12 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-06-08 13:12:12 +0100 |
| commit | 5a7c2ce189876b50fa29754e56c14d28550adbd8 (patch) | |
| tree | f9618bd0222e5f80ccd0f9cd6df425776a5c40ae /src | |
| parent | e4370d41fbff72fe7033fb473aa69f651d7c3f5d (diff) | |
Use boost::filesystem::extension.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dcp.cc | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -122,7 +122,7 @@ DCP::read (bool keep_going, ReadErrors* errors) continue; } - if (boost::algorithm::ends_with (path.string(), ".xml")) { + if (boost::filesystem::extension (path) == ".xml") { xmlpp::DomParser* p = new xmlpp::DomParser; try { p->parse_file (path.string()); @@ -139,7 +139,7 @@ DCP::read (bool keep_going, ReadErrors* errors) } else if (root == "DCSubtitle") { _assets.push_back (shared_ptr<InteropSubtitleAsset> (new InteropSubtitleAsset (path))); } - } else if (boost::algorithm::ends_with (path.string(), ".mxf")) { + } else if (boost::filesystem::extension (path) == ".mxf") { ASDCP::EssenceType_t type; if (ASDCP::EssenceType (path.string().c_str(), type) != ASDCP::RESULT_OK) { throw DCPReadError ("Could not find essence type"); @@ -163,7 +163,7 @@ DCP::read (bool keep_going, ReadErrors* errors) break; default: throw DCPReadError ("Unknown MXF essence type"); - } + } } } |
