diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-08-06 18:32:02 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-08-06 18:32:02 +0100 |
| commit | ad6a1f57b9f1eb0472bb4136d14856f9b4f3f2a6 (patch) | |
| tree | d5b5bfb8ec56ef44b60dfd978d41789334a415f5 /src/tools | |
| parent | 950a8177d14995a5a6ac51acce4a5a851150e4eb (diff) | |
Fix missing help and add a default name if none is specified.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/dcpomatic_create.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/tools/dcpomatic_create.cc b/src/tools/dcpomatic_create.cc index 3d07933e2..fc2282edc 100644 --- a/src/tools/dcpomatic_create.cc +++ b/src/tools/dcpomatic_create.cc @@ -63,6 +63,8 @@ help (string n) cerr << "Create a film directory (ready for making a DCP) or metadata file from some content files.\n" << "A film directory will be created if -o or --output is specified, otherwise a metadata file\n" << "will be written to stdout.\n"; + + syntax (n); } class SimpleSignalManager : public SignalManager @@ -180,11 +182,13 @@ main (int argc, char* argv[]) signal_manager = new SimpleSignalManager (); + if (name.empty ()) { + name = boost::filesystem::path (argv[optind]).leaf().string (); + } + try { shared_ptr<Film> film (new Film (output, false)); - if (!name.empty ()) { - film->set_name (name); - } + film->set_name (name); film->set_container (container_ratio); film->set_dcp_content_type (dcp_content_type); |
