OSDN Git Service

when in cfr mode, tell x264 we are doing cfr and allow x264 to set the timebase to...
authorjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Fri, 2 Apr 2010 16:34:45 +0000 (16:34 +0000)
committerjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Fri, 2 Apr 2010 16:34:45 +0000 (16:34 +0000)
fixes compatibility issue with tsMuxer which many PS3 users use.
now they can select a specific framerate, which will output cfr video
that tsMuxer can grok.  we should have been doing this anyway.

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

libhb/encx264.c

index 566fc55..407df68 100644 (file)
@@ -135,8 +135,17 @@ int encx264Init( hb_work_object_t * w, hb_job_t * job )
     param.i_height     = job->height;
     param.i_fps_num    = job->vrate;
     param.i_fps_den    = job->vrate_base;
-    param.i_timebase_num   = 1;
-    param.i_timebase_den   = 90000;
+    if ( job->cfr == 1 )
+    {
+        param.i_timebase_num   = 0;
+        param.i_timebase_den   = 0;
+        param.b_vfr_input = 0;
+    }
+    else
+    {
+        param.i_timebase_num   = 1;
+        param.i_timebase_den   = 90000;
+    }
 
     /* Disable annexb. Inserts size into nal header instead of start code */
     param.b_annexb     = 0;