Change MagickImageProxy to FFmpegImageProxy and make it use FFmpeg
[dcpomatic.git] / src / lib / decoder_factory.cc
index 02d7064f4ba6e8b090419c3208a57c2c921c13f4..df23ef6f604cb5d476a90f90231a4f9cdeea5c76 100644 (file)
@@ -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 shared_ptr<Decoder>();
+               }
        }
 
        shared_ptr<const ImageContent> ic = dynamic_pointer_cast<const ImageContent> (content);