diff options
author | John Stebbins <[email protected]> | 2016-01-14 13:28:54 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2016-01-14 13:28:54 -0700 |
commit | 458f86d83ade92ed48e7c428d142909f372b5fd3 (patch) | |
tree | f495b23a103781e00f381e17b75e939a53d9aceb /libhb/work.c | |
parent | 3c1781b9857df3d72f137f92e4d71c59b0e63658 (diff) |
work: fix hang in p-to-p encoding
Diffstat (limited to 'libhb/work.c')
-rw-r--r-- | libhb/work.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libhb/work.c b/libhb/work.c index a21481a7c..7a8f1ee19 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -1877,6 +1877,15 @@ void hb_work_loop( void * _w ) { hb_buffer_close( &buf_out ); } + + // Consume data in incoming fifo till job complete so that + // residual data does not stall the pipeline + while (!*w->done && w->fifo_in != NULL) + { + buf_in = hb_fifo_get_wait( w->fifo_in ); + if ( buf_in != NULL ) + hb_buffer_close( &buf_in ); + } } /** |