summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-06-08 13:12:12 +0100
committerCarl Hetherington <cth@carlh.net>2015-06-08 13:12:12 +0100
commit5a7c2ce189876b50fa29754e56c14d28550adbd8 (patch)
treef9618bd0222e5f80ccd0f9cd6df425776a5c40ae
parente4370d41fbff72fe7033fb473aa69f651d7c3f5d (diff)
Use boost::filesystem::extension.
-rw-r--r--src/dcp.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dcp.cc b/src/dcp.cc
index abeafdfb..27ff5b6a 100644
--- a/src/dcp.cc
+++ b/src/dcp.cc
@@ -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");
- }
+ }
}
}