diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-06-04 14:37:43 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-06-04 14:37:43 +0200 |
| commit | a5bd2e9eeecccb1a64aa7f3ae936698fce78bea5 (patch) | |
| tree | 34136bd6b8dc487d578ded06da9d223424da910a /src/frame.h | |
| parent | e8c71ec28755e77bd6851b9ffd698794d214208a (diff) | |
Add option to ignore mismatched HMACs when reading MXFs.
Diffstat (limited to 'src/frame.h')
| -rw-r--r-- | src/frame.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/frame.h b/src/frame.h index 74bd616f..01dfe8b4 100644 --- a/src/frame.h +++ b/src/frame.h @@ -54,12 +54,12 @@ template <class R, class B> class Frame { public: - Frame (R* reader, int n, std::shared_ptr<const DecryptionContext> c) + Frame (R* reader, int n, std::shared_ptr<const DecryptionContext> c, bool check_hmac) { /* XXX: unfortunate guesswork on this buffer size */ _buffer = std::make_shared<B>(Kumu::Megabyte); - if (ASDCP_FAILURE(reader->ReadFrame(n, *_buffer, c->context(), c->hmac()))) { + if (ASDCP_FAILURE(reader->ReadFrame(n, *_buffer, c->context(), check_hmac ? c->hmac() : nullptr))) { boost::throw_exception (ReadError ("could not read frame")); } } |
