diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-04-21 11:39:55 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-04-21 11:39:55 +0100 |
| commit | 063342ee490e86c1cd0b83b2dca36e943caf1ff0 (patch) | |
| tree | 86f38d0aafc3df507f20f8c2f9718d59e4473411 /src | |
| parent | 285528475bf76007c00069e1ffb175cd01d931dd (diff) | |
Hand-apply dbaf6da70557cc94550e95130cb697ce6a100586 from master;
use the picture MXF's filename decided at the start of the encode
the whole way through the encode.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/writer.cc | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc index e8a4ac10b..4270a42a7 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -92,9 +92,6 @@ Writer::Writer (shared_ptr<const Film> f, weak_ptr<Job> j) shared_ptr<Job> job = _job.lock (); DCPOMATIC_ASSERT (job); - job->sub (_("Checking existing image data")); - check_existing_picture_mxf (); - /* Create our picture asset in a subdirectory, named according to those film's parameters which affect the video output. We will hard-link it into the DCP later. @@ -106,6 +103,9 @@ Writer::Writer (shared_ptr<const Film> f, weak_ptr<Job> j) _picture_mxf.reset (new dcp::MonoPictureMXF (dcp::Fraction (_film->video_frame_rate (), 1))); } + job->sub (_("Checking existing image data")); + check_existing_picture_mxf (); + _picture_mxf->set_size (_film->frame_size ()); if (_film->encrypted ()) { @@ -438,9 +438,7 @@ Writer::finish () } /* Hard-link the video MXF into the DCP */ - boost::filesystem::path video_from; - video_from /= _film->internal_video_mxf_dir(); - video_from /= _film->internal_video_mxf_filename(); + boost::filesystem::path video_from = _picture_mxf->file (); boost::filesystem::path video_to; video_to /= _film->dir (_film->dcp_name()); @@ -594,12 +592,9 @@ void Writer::check_existing_picture_mxf () { /* Try to open the existing MXF */ - boost::filesystem::path p; - p /= _film->internal_video_mxf_dir (); - p /= _film->internal_video_mxf_filename (); - FILE* mxf = fopen_boost (p, "rb"); + FILE* mxf = fopen_boost (_picture_mxf->file(), "rb"); if (!mxf) { - LOG_GENERAL ("Could not open existing MXF at %1 (errno=%2)", p.string(), errno); + LOG_GENERAL ("Could not open existing MXF at %1 (errno=%2)", _picture_mxf->file().string(), errno); return; } |
