X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fkdm_dialog.cc;h=abb28c22876e441ea549eb3ea1c2c3c671fda7b9;hb=ad1ef39eda58b3a919ea3b7084401a0439409ec6;hp=5679cf0cb14c2822338d4a78d62e03574b8e9984;hpb=e340b96b4a33725e70e3703b0c60ba8da95bca3b;p=dcpomatic.git diff --git a/src/wx/kdm_dialog.cc b/src/wx/kdm_dialog.cc index 5679cf0cb..abb28c228 100644 --- a/src/wx/kdm_dialog.cc +++ b/src/wx/kdm_dialog.cc @@ -47,6 +47,7 @@ using std::pair; using std::cout; using std::vector; using std::make_pair; +using std::runtime_error; using boost::shared_ptr; using boost::bind; @@ -139,11 +140,20 @@ KDMDialog::make_clicked () shared_ptr film = _film.lock (); DCPOMATIC_ASSERT (film); - list screen_kdms = film->make_kdms ( - _screens->screens(), _cpl->cpl(), _timing->from(), _timing->until(), _output->formulation() - ); + list screen_kdms; + try { + + screen_kdms = film->make_kdms ( + _screens->screens(), _cpl->cpl(), _timing->from(), _timing->until(), _output->formulation(), + !_output->forensic_mark_video(), _output->forensic_mark_audio() ? boost::optional() : 0 + ); + + } catch (runtime_error& e) { + error_dialog (this, std_to_wx(e.what())); + return; + } - pair, int> result = _output->make (screen_kdms, film->name(), _timing, bind (&KDMDialog::confirm_overwrite, this, _1), film->log()); + pair, int> result = _output->make (screen_kdms, film->name(), _timing, bind (&KDMDialog::confirm_overwrite, this, _1)); if (result.first) { JobManager::instance()->add (result.first); }