Fix (I think) AuthenticatedPublic signer.
[libdcp.git] / src / asset.cc
index fb21580e32651ce4be73e5b3947dd68cb8d3367e..06b87953e4631dd42a1cff4a2b680bb0cafc2ba5 100644 (file)
@@ -88,12 +88,22 @@ string
 Asset::digest () const
 {
        if (_digest.empty ()) {
-               _digest = make_digest (path().string());
+               _digest = make_digest (path().string(), 0);
        }
 
        return _digest;
 }
 
+void
+Asset::compute_digest (boost::function<void (float)> progress)
+{
+       if (!_digest.empty ()) {
+               return;
+       }
+
+       _digest = make_digest (path().string(), &progress);
+}
+
 bool
 Asset::equals (shared_ptr<const Asset> other, EqualityOptions, boost::function<void (NoteType, string)> note) const
 {