From 74c75d245110c797415b47206475b20eedbba176 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Wed, 22 Feb 2017 13:33:16 -0700 Subject: [PATCH] encx265: fix 2 pass encoding when framerate is wrong x265 expects the framerate specified to be the same for both passes. So we must set the same value even when we compute that the actual framerate differs from what the file's header says. (cherry picked from commit ac73d24c799292fd6493ef1ce83816fa35c24a6d) --- libhb/encx265.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libhb/encx265.c b/libhb/encx265.c index 0c5d4141a..4bc146f60 100644 --- a/libhb/encx265.c +++ b/libhb/encx265.c @@ -143,9 +143,8 @@ int encx265Init(hb_work_object_t *w, hb_job_t *job) * Some HandBrake-specific defaults; users can override them * using the encoder_options string. */ - hb_reduce(&vrate.num, &vrate.den, job->vrate.num, job->vrate.den); - param->fpsNum = vrate.num; - param->fpsDenom = vrate.den; + param->fpsNum = job->orig_vrate.num; + param->fpsDenom = job->orig_vrate.den; param->keyframeMin = (double)job->orig_vrate.num / job->orig_vrate.den + 0.5; param->keyframeMax = param->keyframeMin * 10; -- 2.40.0