diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-01-28 20:37:02 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-03-09 17:04:02 +0100 |
| commit | 6e3e5d5a94e50a10c0e3252cbebb20e0540cbbed (patch) | |
| tree | d1758074cbf4489c6bc2e7b26561434161954e2e | |
| parent | 1a34aa0b91c86fa02642152bf71bbb5d620bdbd9 (diff) | |
Bail out early when there's a reason why the KDM is invalid.
| -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 f61e2a7de..04711130b 100644 --- a/src/lib/dcp_examiner.cc +++ b/src/lib/dcp_examiner.cc @@ -257,6 +257,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); @@ -276,6 +277,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); @@ -288,6 +290,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 (); } @@ -297,6 +300,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); |
