X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic.cc;h=d207953ce5824101982e329e004ba37f8bd9eefb;hb=aea3b88c63895121cbb632dfc84755a11cdeffba;hp=331e2995af5d45edc116b0fd5c464994dcb22a10;hpb=fb66531502fda94d50c7b1399178ff08f6c6eaac;p=dcpomatic.git diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 331e2995a..d207953ce 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -83,6 +83,7 @@ #include "lib/check_content_change_job.h" #include "lib/text_content.h" #include "lib/dcpomatic_log.h" +#include "lib/subtitle_encoder.h" #include #include #include @@ -509,7 +510,7 @@ private: } catch (boost::filesystem::filesystem_error& e) { #ifdef DCPOMATIC_WINDOWS string bad_chars = "<>:\"/|?*"; - string const filename = d->path().string(); + string const filename = d->path().filename().string(); string found_bad_chars; for (size_t i = 0; i < bad_chars.length(); ++i) { if (filename.find(bad_chars[i]) != string::npos && found_bad_chars.find(bad_chars[i]) == string::npos) { @@ -911,15 +912,21 @@ private: ExportDialog* d = new ExportDialog (this, _film->isdcf_name(true)); if (d->ShowModal() == wxID_OK) { shared_ptr job (new TranscodeJob (_film)); - job->set_encoder ( - shared_ptr ( - new FFmpegEncoder (_film, job, d->path(), d->format(), d->mixdown_to_stereo(), d->split_reels(), d->x264_crf() + if (d->format() == EXPORT_FORMAT_SUBTITLES_DCP) { + job->set_encoder ( + shared_ptr(new SubtitleEncoder(_film, job, d->path(), d->split_reels())) + ); + } else { + job->set_encoder ( + shared_ptr ( + new FFmpegEncoder (_film, job, d->path(), d->format(), d->mixdown_to_stereo(), d->split_reels(), d->x264_crf() #ifdef DCPOMATIC_VARIANT_SWAROOP - , optional(), optional() + , optional(), optional() #endif + ) ) - ) - ); + ); + } JobManager::instance()->add (job); } d->Destroy ();