Bv2.1 8.5: Features must have FFEC/FFMC markers.
[libdcp.git] / tools / dcpthumb.cc
index 73f70f2da007b001d02e33d49570d7126d8140ff..2adccfd06cafb6bd2eb599f563c961c62cefe96d 100644 (file)
@@ -53,6 +53,8 @@ help (string n)
 int
 main (int argc, char* argv[])
 {
+       dcp::init ();
+
        int option_index = 0;
        while (true) {
                struct option long_options[] = {
@@ -78,6 +80,12 @@ main (int argc, char* argv[])
                exit (EXIT_FAILURE);
        }
 
-       cout << dcp::Certificate(dcp::file_to_string(argv[optind])).thumbprint() << "\n";
+       try {
+               cout << dcp::Certificate(dcp::file_to_string(argv[optind])).thumbprint() << "\n";
+       } catch (boost::filesystem::filesystem_error& e) {
+               cerr << e.what() << "\n";
+               return -1;
+       }
+
        return 0;
 }