From e80119614a0975de33ed8a370fbfe60a2a915b1e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 8 May 2025 22:24:14 +0200 Subject: Only check hashes of each asset once (#3035). --- src/verify_internal.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/verify_internal.h') diff --git a/src/verify_internal.h b/src/verify_internal.h index 97c0e90f..d6e3c075 100644 --- a/src/verify_internal.h +++ b/src/verify_internal.h @@ -49,6 +49,7 @@ #include #include #include +#include #include @@ -131,6 +132,13 @@ public: } } + bool should_verify_asset(std::string const& id) + { + auto const should = verified_assets.find(id) == verified_assets.end(); + verified_assets.insert(id); + return should; + } + std::vector& notes; std::shared_ptr dcp; std::shared_ptr cpl; @@ -138,6 +146,8 @@ public: std::function)> stage; std::function progress; VerificationOptions options; + /** IDs of assets that have already been verified and need not be checked again */ + std::unordered_set verified_assets; boost::optional subtitle_language; boost::optional audio_channels; -- cgit v1.2.3