summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2016-01-15 09:25:27 -0700
committerJohn Stebbins <[email protected]>2016-01-15 09:25:27 -0700
commitea41fc2983591d73e1aa6d817f646bf5679060b7 (patch)
treee30434906c2d0b218e9849c42cbf90a35e05082c
parent7372e56f3f3c98c4c70d9cf3bf81fd4b85c3fe9b (diff)
work: fix failure to die upon canceled encode
-rw-r--r--libhb/work.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libhb/work.c b/libhb/work.c
index 7a8f1ee19..eb71cf806 100644
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -1880,7 +1880,8 @@ void hb_work_loop( void * _w )
// Consume data in incoming fifo till job complete so that
// residual data does not stall the pipeline
- while (!*w->done && w->fifo_in != NULL)
+ while ((w->die == NULL || !*w->die) &&
+ !*w->done && w->fifo_in != NULL)
{
buf_in = hb_fifo_get_wait( w->fifo_in );
if ( buf_in != NULL )