From 673a841b1ef2dcd31647fce00829dc4a3f2b0715 Mon Sep 17 00:00:00 2001 From: jstebbins Date: Tue, 8 Mar 2011 16:12:57 +0000 Subject: make keyint match between 1st and 2nd passes of vfr and pfr encodes. make keyint and fps settings consistent across video encoders. make interjob->vrate changes for pfr mode like we do for vfr since pfr is the same as vfr except when it hits it's peak. in mkv, set track default duration to actual measured vrate on 2 pass encodes. thanks to Rodeo for the corrections in encx264 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3831 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/muxmkv.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'libhb/muxmkv.c') diff --git a/libhb/muxmkv.c b/libhb/muxmkv.c index 073b39f45..f169e3de1 100644 --- a/libhb/muxmkv.c +++ b/libhb/muxmkv.c @@ -148,8 +148,19 @@ static int MKVInit( hb_mux_object_t * m ) track->extra.video.displayWidth = job->width; } - - track->defaultDuration = (int64_t)(((float)job->vrate_base / (float)job->vrate) * 1000000000); + int vrate_base, vrate; + if( job->pass == 2 ) + { + hb_interjob_t * interjob = hb_interjob_get( job->h ); + vrate_base = interjob->vrate_base; + vrate = interjob->vrate; + } + else + { + vrate_base = job->vrate_base; + vrate = job->vrate; + } + track->defaultDuration = (int64_t)(((float)vrate_base / (float)vrate) * 1000000000); mux_data->track = mk_createTrack(m->file, track); -- cgit v1.2.3