Try to tidy up frame indexing; use DCP length obtained from the transcode to make...
[dcpomatic.git] / src / lib / imagemagick_decoder.cc
index 0637305402667cc07a9849e1a84057d0e26d9c95..bab4f2f072f1b19c0dad60958936f1f8a0061db5 100644 (file)
@@ -27,6 +27,7 @@
 
 using std::cout;
 using boost::shared_ptr;
+using libdcp::Size;
 
 ImageMagickDecoder::ImageMagickDecoder (
        boost::shared_ptr<Film> f, DecodeOptions o, Job* j)
@@ -70,7 +71,7 @@ bool
 ImageMagickDecoder::pass ()
 {
        if (_iter == _files.end()) {
-               if (!_film->dcp_length() || video_frame() >= _film->dcp_length().get()) {
+               if (video_frame() >= _film->still_duration_in_frames()) {
                        return true;
                }