summaryrefslogtreecommitdiff
path: root/src/asset_reader.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-06-04 14:37:43 +0200
committerCarl Hetherington <cth@carlh.net>2021-06-04 14:37:43 +0200
commita5bd2e9eeecccb1a64aa7f3ae936698fce78bea5 (patch)
tree34136bd6b8dc487d578ded06da9d223424da910a /src/asset_reader.h
parente8c71ec28755e77bd6851b9ffd698794d214208a (diff)
Add option to ignore mismatched HMACs when reading MXFs.
Diffstat (limited to 'src/asset_reader.h')
-rw-r--r--src/asset_reader.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/asset_reader.h b/src/asset_reader.h
index 2da67bd8..8478b51f 100644
--- a/src/asset_reader.h
+++ b/src/asset_reader.h
@@ -72,13 +72,17 @@ public:
std::shared_ptr<const F> get_frame (int n) const
{
/* Can't use make_shared here as the constructor is private */
- return std::shared_ptr<const F> (new F(_reader, n, _crypto_context));
+ return std::shared_ptr<const F> (new F(_reader, n, _crypto_context, _check_hmac));
}
R* reader () const {
return _reader;
}
+ void set_check_hmac (bool check) {
+ _check_hmac = check;
+ }
+
protected:
R* _reader = nullptr;
std::shared_ptr<DecryptionContext> _crypto_context;
@@ -100,6 +104,8 @@ private:
boost::throw_exception (FileError("could not open MXF file for reading", asset->file().get(), r));
}
}
+
+ bool _check_hmac = true;
};