]> granicus.if.org Git - handbrake/commitdiff
encx265: fix 2 pass encoding when framerate is wrong
authorJohn Stebbins <jstebbins.hb@gmail.com>
Wed, 22 Feb 2017 20:33:16 +0000 (13:33 -0700)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Wed, 22 Feb 2017 20:35:43 +0000 (13:35 -0700)
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

index 0c5d4141a977314d1ffc1b1c938eeb9e88bc3379..4bc146f60e6069c3d9e94aa960fe11c80ef5f98f 100644 (file)
@@ -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;