- if (ASDCP_FAILURE (reader->ReadFrame (n, *_buffer, c))) {
- boost::throw_exception (DCPReadError (String::compose ("could not read video frame %1", n)));
+ auto const r = reader->ReadFrame (n, *_buffer, c->context(), check_hmac ? c->hmac() : nullptr);
+
+ if (ASDCP_FAILURE(r)) {
+ boost::throw_exception (ReadError(String::compose ("could not read video frame %1 (%2)", n, static_cast<int>(r))));