summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2016-12-20 12:15:32 +0100
committerDamiano Galassi <[email protected]>2016-12-20 12:15:32 +0100
commit3586396665f8eb52d3ac3dcf8b315c98d756bf4a (patch)
tree88c58b3466817a50d2360c5ef3ffe49a3837378d
parent9a282322eb0cb5ad01badf7130cc8837a23ea8f6 (diff)
libhb: immediately set hb_state_t pass and pass_count to -1 in hb_start(), so a UI can check if pass_count has been set or not yet, to avoid displaying a random value for half a second if it tries to display the pass state before the work thread has been initialized.
-rw-r--r--libhb/hb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libhb/hb.c b/libhb/hb.c
index 32e824633..7ccc30054 100644
--- a/libhb/hb.c
+++ b/libhb/hb.c
@@ -1698,6 +1698,8 @@ void hb_start( hb_handle_t * h )
hb_lock( h->state_lock );
h->state.state = HB_STATE_WORKING;
#define p h->state.param.working
+ p.pass = -1;
+ p.pass_count = -1;
p.progress = 0.0;
p.rate_cur = 0.0;
p.rate_avg = 0.0;