diff options
author | John Stebbins <[email protected]> | 2016-01-19 12:26:35 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2016-01-19 12:26:35 -0700 |
commit | 2eef7441c3bf670d4392c3cbcf887c77a0354aef (patch) | |
tree | 3fa7642cd768cac2f4d166dbf90a5ee56e3e367c /libhb | |
parent | 41e238c5f34d30a7d07c455d0de8334edb35ec90 (diff) |
libhb: fix hang during subtitle scan
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/sync.c | 6 | ||||
-rw-r--r-- | libhb/work.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/libhb/sync.c b/libhb/sync.c index dadf1c26a..5520603bb 100644 --- a/libhb/sync.c +++ b/libhb/sync.c @@ -630,6 +630,12 @@ int syncVideoWork( hb_work_object_t * w, hb_buffer_t ** buf_in, pv->common->start_found = 1; // Unblock anybody waiting on this threads last PTS setSyncPTS(pv, INT64_MAX, 0); + if (job->indepth_scan) + { + // During subtitle scan, sync is the end of the pipeline. + // Terminate job when EOF reached. + *w->done = 1; + } return HB_WORK_DONE; } diff --git a/libhb/work.c b/libhb/work.c index eb71cf806..31e4cad96 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -1878,8 +1878,9 @@ 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 + // Consume data in incoming fifo till job completes so that + // residual data does not stall the pipeline. There can be + // residual data during point-to-point encoding. while ((w->die == NULL || !*w->die) && !*w->done && w->fifo_in != NULL) { |