projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1a34aa0
)
Bail out early when there's a reason why the KDM is invalid.
author
Carl Hetherington
<cth@carlh.net>
Fri, 28 Jan 2022 19:37:02 +0000
(20:37 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Wed, 9 Mar 2022 16:04:02 +0000
(17:04 +0100)
src/lib/dcp_examiner.cc
patch
|
blob
|
history
diff --git
a/src/lib/dcp_examiner.cc
b/src/lib/dcp_examiner.cc
index f61e2a7de1f0dad23073339ee1f07c08505136da..04711130b9e2357412ce1624e924f2e444ebdd13 100644
(file)
--- 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");
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);
}
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");
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);
}
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");
if (mxf_sub && mxf_sub->encrypted() && !mxf_sub->key()) {
_kdm_valid = false;
LOG_GENERAL_NC ("Subtitle has no key");
+ break;
}
sub->subtitles ();
}
}
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");
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);
}
auto reader = atmos->start_read();
reader->set_check_hmac (false);