OSDN Git Service

fix a problem with search progress indicator and p-to-p
authorjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 14 Nov 2010 01:56:07 +0000 (01:56 +0000)
committerjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 14 Nov 2010 01:56:07 +0000 (01:56 +0000)
using incorrect timestamp gave bad progress percent

git-svn-id: svn://localhost/HandBrake/trunk@3678 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/sync.c

index 34ce460..cfc0c2a 100644 (file)
@@ -338,7 +338,7 @@ int syncVideoWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
             hb_cond_broadcast( pv->common->next_frame );
             hb_unlock( pv->common->mutex );
 
-            UpdateSearchState( w, next->start );
+            UpdateSearchState( w, next_start );
             hb_buffer_close( &next );
 
             return HB_WORK_OK;
@@ -610,13 +610,14 @@ int syncVideoWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
                      * so just push them through for rendering.
                      *
                      */
-                    if( sub_start < start )
+                    if( sub_start <= start )
                     {
                         sub = hb_fifo_get( subtitle->fifo_raw );
                         sub->start = sub_start;
                         sub->stop = sub_stop;
                         hb_fifo_push( subtitle->fifo_out, sub );
                     } else {
+                        // sub too early. Leave it in the fifo.
                         sub = NULL;
                         break;
                     }