diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-24 23:27:23 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-24 23:27:23 +0100 |
| commit | 165edfe3bb8afd0531729f732701756d711dde16 (patch) | |
| tree | 548b2b263704dcb3ebfd62af76fc27d5a4ffcce6 /src/lib/make_dcp_job.cc | |
| parent | abd57c6c2e8526eac93e9d0c9bd0b6080de1e6fa (diff) | |
Try to clean up source length handling.
Diffstat (limited to 'src/lib/make_dcp_job.cc')
| -rw-r--r-- | src/lib/make_dcp_job.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/make_dcp_job.cc b/src/lib/make_dcp_job.cc index e2c90a854..2bb0e1ba0 100644 --- a/src/lib/make_dcp_job.cc +++ b/src/lib/make_dcp_job.cc @@ -70,6 +70,10 @@ MakeDCPJob::wav_path (libdcp::Channel c) const void MakeDCPJob::run () { + if (!_film->dcp_length()) { + throw EncodeError ("cannot make a DCP when the source length is not known"); + } + string const dcp_path = _film->dir (_film->dcp_name()); /* Remove any old DCP */ @@ -78,7 +82,7 @@ MakeDCPJob::run () int frames = 0; switch (_film->content_type ()) { case VIDEO: - frames = _film->dcp_length (); + frames = _film->dcp_length().get(); break; case STILL: frames = _film->still_duration() * ImageMagickDecoder::static_frames_per_second (); |
