summaryrefslogtreecommitdiffstats
path: root/libhb/sync.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2016-01-27 12:44:03 -0700
committerJohn Stebbins <[email protected]>2016-01-27 12:44:03 -0700
commitaa9e61d194f5b2a9f54f49067eb85d2655feb20d (patch)
tree38cb542292f924d87ae80aa28e35d31b694c475f /libhb/sync.c
parent091e559752a8c452fb81be2356143d909030ae74 (diff)
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.
Diffstat (limited to 'libhb/sync.c')
-rw-r--r--libhb/sync.c9
1 files changed, 9 insertions, 0 deletions
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;
}