]> granicus.if.org Git - handbrake/commitdiff
libhb: fix hang during subtitle scan
authorJohn Stebbins <jstebbins.hb@gmail.com>
Tue, 19 Jan 2016 19:26:35 +0000 (12:26 -0700)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Tue, 19 Jan 2016 19:26:35 +0000 (12:26 -0700)
libhb/sync.c
libhb/work.c

index dadf1c26a822cf4f014bd83a796bf49e1b501ddd..5520603bbf5ab82b8315bfa779f206f777ba14bf 100644 (file)
@@ -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;
     }
 
index eb71cf8060529b4c33f253554227f08ae319ddfe..31e4cad96695c82702982ab34c33a9b5df2f6b4e 100644 (file)
@@ -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)
     {