OSDN Git Service

"Great! Where are we going?"
authorjbrjake <jbrjake@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Fri, 28 Dec 2007 18:17:24 +0000 (18:17 +0000)
committerjbrjake <jbrjake@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Fri, 28 Dec 2007 18:17:24 +0000 (18:17 +0000)
Prevents sync.c from prematurely ending the encode when its estimated maximum frame count is too low, by doubling that maximum.
Thanks for fixing this long-standing bug, van!

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

libhb/sync.c

index bfc40af..3521ad0 100644 (file)
@@ -567,9 +567,9 @@ static int SyncVideo( hb_work_object_t * w )
         UpdateState( w );
 
         /* Make sure we won't get more frames then expected */
-        if( pv->count_frames >= pv->count_frames_max )
+        if( pv->count_frames >= pv->count_frames_max * 2)
         {
-            hb_log( "sync: got %lld frames", pv->count_frames );
+            hb_log( "sync: got too many frames (%lld), exiting early", pv->count_frames );
             pv->done = 1;
             
            // Drop an empty buffer into our output to ensure that things