From c536ea976130ef09f2781178271c06f6e25cc08b Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Sun, 3 Feb 2019 08:28:01 +0100 Subject: [PATCH] libhb: do not set HB_STATE_WORKDONE before all the work threads are closed. (cherry picked from commit a8ef28a582283d34fda6dd81f4be60f810e0865d) --- libhb/work.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libhb/work.c b/libhb/work.c index 2770b00af..c0bdc64c2 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -77,7 +77,7 @@ static void InitWorkState(hb_handle_t *h, int pass_id, int pass, int pass_count) } -static void SetWorkdoneState(hb_job_t *job) +static void SetWorkStateInfo(hb_job_t *job) { hb_state_t state; @@ -88,7 +88,6 @@ static void SetWorkdoneState(hb_job_t *job) } hb_get_state2(job->h, &state); - state.state = HB_STATE_WORKDONE; state.param.working.error = *job->done_error; state.param.working.sequence_id = job->sequence_id; @@ -155,7 +154,7 @@ static void work_func( void * _work ) do_job( job ); *(work->current_job) = NULL; } - SetWorkdoneState(job); + SetWorkStateInfo(job); // Clean job passes for (pass = 0; pass < pass_count; pass++) -- 2.40.0