From aa9e61d194f5b2a9f54f49067eb85d2655feb20d Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Wed, 27 Jan 2016 12:44:03 -0700 Subject: [PATCH] sync: fix hang in subtitle scan pass if there are no subtitles in the file, our check that would terminate the subtitle scan pass does not get executed. --- libhb/sync.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libhb/sync.c b/libhb/sync.c index 9f95c3c53..dd8c54adc 100644 --- a/libhb/sync.c +++ b/libhb/sync.c @@ -1697,6 +1697,15 @@ static int syncVideoWork( hb_work_object_t * w, hb_buffer_t ** buf_in, { streamFlush(pv->stream); *buf_out = hb_buffer_list_clear(&pv->stream->out_queue); + // Ideally, we would only do this subtitle scan check in + // syncSubtitleWork, but someone might try to do a subtitle + // scan on a source that has no subtitles :-( + if (pv->common->job->indepth_scan) + { + // When doing subtitle indepth scan, the pipeline ends at sync. + // Terminate job when EOF reached. + *w->done = 1; + } return HB_WORK_DONE; } -- 2.40.0