Add a load of explicit keywords.
[dcpomatic.git] / src / tools / dcpomatic_create.cc
index 1f9a5b7ec94cf71a027e091a57d9abd1fe36cbe2..a9d1165f14c02a563d93ca268974c2544a0050c0 100644 (file)
@@ -238,9 +238,10 @@ main (int argc, char* argv[])
                for (int i = optind; i < argc; ++i) {
                        boost::filesystem::path const can = boost::filesystem::canonical (argv[i]);
                        list<shared_ptr<Content> > content;
-                       try {
+
+                       if (boost::filesystem::exists (can / "ASSETMAP") || (boost::filesystem::exists (can / "ASSETMAP.xml"))) {
                                content.push_back (shared_ptr<DCPContent> (new DCPContent (film, can)));
-                       } catch (dcp::DCPReadError& e) {
+                       } else {
                                /* I guess it's not a DCP */
                                content = content_factory (film, can);
                        }
@@ -268,7 +269,7 @@ main (int argc, char* argv[])
                ContentList content = film->content ();
                for (ContentList::iterator i = content.begin(); i != content.end(); ++i) {
                        shared_ptr<ImageContent> ic = dynamic_pointer_cast<ImageContent> (*i);
-                       if (ic) {
+                       if (ic && ic->still()) {
                                ic->video->set_length (still_length * 24);
                        }
                }