summaryrefslogtreecommitdiff
path: root/src/lib/decoder_factory.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-09-04 00:31:38 +0100
committerCarl Hetherington <cth@carlh.net>2018-09-04 00:31:38 +0100
commita45dd41c4dc7b95b1e3e79640e965ae663e7e680 (patch)
treed32ac253a44c2f46629dad84e75b10f3e7526cd6 /src/lib/decoder_factory.cc
parenta8f7f04a68b3bdf3df1975541323166bf472a6cd (diff)
Return 0 from decoder_factory when we have a DCP with no KDM, rather than throwing an exception.
Diffstat (limited to 'src/lib/decoder_factory.cc')
-rw-r--r--src/lib/decoder_factory.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/decoder_factory.cc b/src/lib/decoder_factory.cc
index 02d7064f4..b9baefa80 100644
--- a/src/lib/decoder_factory.cc
+++ b/src/lib/decoder_factory.cc
@@ -46,7 +46,12 @@ decoder_factory (shared_ptr<const Content> content, shared_ptr<Log> log, bool fa
shared_ptr<const DCPContent> dc = dynamic_pointer_cast<const DCPContent> (content);
if (dc) {
- return shared_ptr<Decoder> (new DCPDecoder (dc, log, fast));
+ try {
+ return shared_ptr<Decoder> (new DCPDecoder (dc, log, fast));
+ } catch (KDMError& e) {
+ /* This will be found and reported to the user when the content is examined */
+ return 0;
+ }
}
shared_ptr<const ImageContent> ic = dynamic_pointer_cast<const ImageContent> (content);