From 85c565b56de05e93617a8dfd633d6f9d6e9cb30a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 24 Apr 2022 22:38:52 +0200 Subject: Try to remove the PKL object, and make it so that we don't keep the PKL assets around after reading them. But verification needs to see those assets, to check the hashes. --- src/asset.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/asset.cc') diff --git a/src/asset.cc b/src/asset.cc index 6e200b0d..ba43063d 100644 --- a/src/asset.cc +++ b/src/asset.cc @@ -41,7 +41,7 @@ #include "compose.hpp" #include "dcp_assert.h" #include "exceptions.h" -#include "pkl.h" +#include "pkl_internal.h" #include "raw_convert.h" #include "util.h" #include "warnings.h" @@ -51,9 +51,10 @@ LIBDCP_ENABLE_WARNINGS #include +using std::shared_ptr; using std::string; +using std::vector; using boost::function; -using std::shared_ptr; using boost::optional; using namespace boost::filesystem; using namespace dcp; @@ -81,7 +82,7 @@ Asset::Asset (string id, path file) void -Asset::add_to_pkl (shared_ptr pkl, path root) const +Asset::add_to_pkl (vector& assets, path root, dcp::Standard standard) const { DCP_ASSERT (_file); @@ -97,7 +98,7 @@ Asset::add_to_pkl (shared_ptr pkl, path root) const return; } - pkl->add_asset (_id, _id, hash(), file_size(_file.get()), pkl_type(pkl->standard())); + assets.push_back(PKLAsset(_id, {}, hash(), file_size(_file.get()), pkl_type(standard))); } -- cgit v1.2.3