]> granicus.if.org Git - handbrake/commitdiff
work: fix failure to die upon canceled encode
authorJohn Stebbins <jstebbins.hb@gmail.com>
Fri, 15 Jan 2016 16:25:27 +0000 (09:25 -0700)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Fri, 15 Jan 2016 16:25:27 +0000 (09:25 -0700)
libhb/work.c

index 7a8f1ee192d157f55e48387057c6e51bfc9f7081..eb71cf8060529b4c33f253554227f08ae319ddfe 100644 (file)
@@ -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 )