From: Carl Hetherington Date: Tue, 5 Jul 2016 15:04:54 +0000 (+0100) Subject: Try to improve progress reporting when doing image/sound digests. X-Git-Tag: v2.8.19~3 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=734a654a07ba97cb6d55309e00f8525d196c88ce Try to improve progress reporting when doing image/sound digests. --- diff --git a/src/lib/job.cc b/src/lib/job.cc index 0699c532c..9d1b25867 100644 --- a/src/lib/job.cc +++ b/src/lib/job.cc @@ -324,6 +324,7 @@ Job::sub (string n) } set_progress (0, true); + _start_time = time (0); } string diff --git a/src/lib/transcode_job.cc b/src/lib/transcode_job.cc index 7144f70d5..fe7132699 100644 --- a/src/lib/transcode_job.cc +++ b/src/lib/transcode_job.cc @@ -133,10 +133,13 @@ TranscodeJob::remaining_time () const /* _transcoder might be destroyed by the job-runner thread */ shared_ptr t = _transcoder; - if (!t) { - return 0; + if (!t || t->finishing()) { + /* We aren't doing any actual encoding so just use the job's guess */ + return Job::remaining_time (); } + /* We're encoding so guess based on the current encoding rate */ + float fps = t->current_encoding_rate (); if (fps == 0) {