diff options
author | jstebbins <[email protected]> | 2013-03-14 23:30:09 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2013-03-14 23:30:09 +0000 |
commit | 8caf161063b9589e7a0a4795f424f3c9df92b0ef (patch) | |
tree | 48adef420fda22051a80aff99ea20651823235a2 | |
parent | 5793ee9698de59ab0bd67bdd4f707248fe7833fc (diff) |
libhb: fix incorrect scan progress
slightly wrong calculation caused progress to go backwards sometimes.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5328 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | libhb/scan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libhb/scan.c b/libhb/scan.c index 7dfb44c60..40dffa01e 100644 --- a/libhb/scan.c +++ b/libhb/scan.c @@ -1119,9 +1119,9 @@ static void UpdateState2(hb_scan_t *scan, int title) p.preview_cur = 1; p.preview_count = scan->preview_count; if (scan->title_index) - p.progress = (float)p.title_cur / p.title_count; + p.progress = (float)(p.title_cur - 1) / p.title_count; else - p.progress = 0.5 + 0.5 * (float)p.title_cur / p.title_count; + p.progress = 0.5 + 0.5 * (float)(p.title_cur - 1) / p.title_count; #undef p hb_set_state(scan->h, &state); |