diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-07-05 16:04:54 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-07-05 16:04:54 +0100 |
| commit | 734a654a07ba97cb6d55309e00f8525d196c88ce (patch) | |
| tree | 2d72d0590c88ad862efc5cad61799b6846c715fc /src/lib/transcode_job.cc | |
| parent | 778fe8cf0625a1ee9c754ebda23ba14c409cf1a2 (diff) | |
Try to improve progress reporting when doing image/sound digests.
Diffstat (limited to 'src/lib/transcode_job.cc')
| -rw-r--r-- | src/lib/transcode_job.cc | 7 |
1 files changed, 5 insertions, 2 deletions
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<Transcoder> 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) { |
