Merge master.
[dcpomatic.git] / src / lib / transcode_job.cc
index ef15f9f5e9865968ecee6f6b87e0437e672d1e66..4a85fa18aa8935d0a2c0ff5670f504de012b439e 100644 (file)
@@ -37,6 +37,7 @@ using std::string;
 using std::stringstream;
 using std::fixed;
 using std::setprecision;
+using std::cout;
 using boost::shared_ptr;
 
 /** @param s Film to use.
@@ -106,6 +107,7 @@ TranscodeJob::status () const
        return s.str ();
 }
 
+/** @return Approximate remaining time in seconds */
 int
 TranscodeJob::remaining_time () const
 {
@@ -123,6 +125,5 @@ TranscodeJob::remaining_time () const
        }
 
        /* Compute approximate proposed length here, as it's only here that we need it */
-       OutputVideoFrame const left = _film->time_to_video_frames (_film->length ()) - t->video_frames_out();
-       return left / fps;
+       return (_film->length().frames (_film->video_frame_rate ()) - t->video_frames_out()) / fps;
 }