diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-01-28 20:37:02 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-01-28 20:37:02 +0100 |
| commit | 3ade5560535637d99adbd02cd40125ebb3776e0d (patch) | |
| tree | 54fe2ca4e8c8e2a42383ae6556e1489b872eef15 /src/lib | |
| parent | 3f1e65df529ba1c601fd6e81962041f0ff4a56fe (diff) | |
Bail out early when there's a reason why the KDM is invalid.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/dcp_examiner.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/dcp_examiner.cc b/src/lib/dcp_examiner.cc index 77a1e7c0b..f2ec68bdd 100644 --- a/src/lib/dcp_examiner.cc +++ b/src/lib/dcp_examiner.cc @@ -263,6 +263,7 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant) if (pic->encrypted() && !pic->key()) { _kdm_valid = false; LOG_GENERAL_NC ("Picture has no key"); + break; } auto mono = dynamic_pointer_cast<dcp::MonoPictureAsset>(pic); auto stereo = dynamic_pointer_cast<dcp::StereoPictureAsset>(pic); @@ -282,6 +283,7 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant) if (sound->encrypted() && !sound->key()) { _kdm_valid = false; LOG_GENERAL_NC ("Sound has no key"); + break; } auto reader = i->main_sound()->asset()->start_read(); reader->set_check_hmac (false); @@ -294,6 +296,7 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant) if (mxf_sub && mxf_sub->encrypted() && !mxf_sub->key()) { _kdm_valid = false; LOG_GENERAL_NC ("Subtitle has no key"); + break; } sub->subtitles (); } @@ -303,6 +306,7 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant) if (atmos->encrypted() && !atmos->key()) { _kdm_valid = false; LOG_GENERAL_NC ("ATMOS sound has no key"); + break; } auto reader = atmos->start_read(); reader->set_check_hmac (false); |
