From dea00c1b3845382e900b7e592fe4550e95e1bdc0 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 14 May 2023 00:30:21 +0200 Subject: Don't scan the directory on DCPContent creation; instead do it when the examine() happens. --- src/lib/dcp_examiner.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lib/dcp_examiner.cc') diff --git a/src/lib/dcp_examiner.cc b/src/lib/dcp_examiner.cc index 9c4f899c6..b9ff3a238 100644 --- a/src/lib/dcp_examiner.cc +++ b/src/lib/dcp_examiner.cc @@ -61,11 +61,12 @@ using std::vector; using boost::optional; -DCPExaminer::DCPExaminer (shared_ptr content, bool tolerant) +DCPExaminer::DCPExaminer (shared_ptr content, bool tolerant, vector const& paths) + : _paths(paths) { shared_ptr selected_cpl; - auto cpls = dcp::find_and_resolve_cpls (content->directories(), tolerant); + auto cpls = dcp::find_and_resolve_cpls(dcp::DCP::directories_from_files(_paths), tolerant); if (content->cpl ()) { /* Use the CPL that was specified, or that the content was using before */ -- cgit v1.2.3