summaryrefslogtreecommitdiff
path: root/src/lib/transcode_job.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/transcode_job.cc')
-rw-r--r--src/lib/transcode_job.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/transcode_job.cc b/src/lib/transcode_job.cc
index 7b304cb35..97e8bd416 100644
--- a/src/lib/transcode_job.cc
+++ b/src/lib/transcode_job.cc
@@ -34,6 +34,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.
@@ -72,9 +73,6 @@ TranscodeJob::run ()
_transcoder.reset ();
} catch (...) {
- set_progress (1);
- set_state (FINISHED_ERROR);
- _film->log()->log (N_("Transcode job failed or cancelled"));
_transcoder.reset ();
throw;
}
@@ -103,6 +101,7 @@ TranscodeJob::status () const
return s.str ();
}
+/** @return Approximate remaining time in seconds */
int
TranscodeJob::remaining_time () const
{
@@ -120,6 +119,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;
}