projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8f7f04
)
Return 0 from decoder_factory when we have a DCP with no KDM, rather than throwing...
author
Carl Hetherington
<cth@carlh.net>
Mon, 3 Sep 2018 23:31:38 +0000
(
00:31
+0100)
committer
Carl Hetherington
<cth@carlh.net>
Mon, 3 Sep 2018 23:31:38 +0000
(
00:31
+0100)
src/lib/decoder_factory.cc
patch
|
blob
|
history
diff --git
a/src/lib/decoder_factory.cc
b/src/lib/decoder_factory.cc
index 02d7064f4ba6e8b090419c3208a57c2c921c13f4..b9baefa807e52c970c36d6f52fa9e8ad98d4c5b7 100644
(file)
--- 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);