diff options
author | jstebbins <[email protected]> | 2011-03-13 21:51:14 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2011-03-13 21:51:14 +0000 |
commit | 9d05a2b4756b2bbffac60eb50fc98e6cb1f4f9f0 (patch) | |
tree | a9f15a7749f49a8cb5e610b47343026f0436797b /libhb/work.c | |
parent | 1e6f3e13c431598ea8338fa19dd0f2504e2b3ef5 (diff) |
fix 2 pass cfr x264 crash
An error in interjob->vrate calculation lead to specifying a different
timebase for the 1st and 2nd pass which x264 does not allow. This
improves the interjob->vrate calculation accuracy and also guarantees
the timebase is the same on both passes regardless of the calculations
accuracy.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3848 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/work.c')
-rw-r--r-- | libhb/work.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libhb/work.c b/libhb/work.c index 39d926d3c..c8caff7b8 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -376,17 +376,13 @@ void hb_display_job_info( hb_job_t * job ) /* Corrects framerates when actual duration and frame count numbers are known. */ void correct_framerate( hb_job_t * job ) { - int real_frames; - hb_interjob_t * interjob = hb_interjob_get( job->h ); if( ( job->sequence_id & 0xFFFFFF ) != ( interjob->last_job & 0xFFFFFF) ) return; // Interjob information is for a different encode. // compute actual output vrate from first pass - real_frames = interjob->frame_count - interjob->render_dropped; - - interjob->vrate = job->vrate_base * ( (double)real_frames * 90000 / interjob->total_time ); + interjob->vrate = job->vrate_base * ( (double)interjob->out_frame_count * 90000 / interjob->total_time ); interjob->vrate_base = job->vrate_base; } |