diff options
author | jstebbins <[email protected]> | 2009-11-07 17:29:03 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2009-11-07 17:29:03 +0000 |
commit | ccca5789382f571a21edf068549a5bf85dfbbda4 (patch) | |
tree | 361668f605bad25a3022c42b186f30cddbdd34b0 /libhb/sync.c | |
parent | 953bf32afdef1656cc22c3ab973b32cc4b2b78f0 (diff) |
Maintain an accurate job ETA across pause/resume
Keeps track of how much time is spent paused and factors that into
the ETA calculation
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2918 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/sync.c')
-rw-r--r-- | libhb/sync.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libhb/sync.c b/libhb/sync.c index 514b1fb43..94b8411b4 100644 --- a/libhb/sync.c +++ b/libhb/sync.c @@ -973,6 +973,8 @@ static void UpdateState( hb_work_object_t * w ) if( !pv->count_frames ) { pv->st_first = hb_get_date(); + pv->job->st_pause_date = -1; + pv->job->st_paused = 0; } pv->count_frames++; @@ -1000,7 +1002,7 @@ static void UpdateState( hb_work_object_t * w ) { int eta; p.rate_avg = 1000.0 * (float) pv->st_counts[3] / - (float) ( pv->st_dates[3] - pv->st_first ); + (float) ( pv->st_dates[3] - pv->st_first - pv->job->st_paused); eta = (float) ( pv->count_frames_max - pv->st_counts[3] ) / p.rate_avg; p.hours = eta / 3600; |