summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2010-04-02 16:34:45 +0000
committerjstebbins <[email protected]>2010-04-02 16:34:45 +0000
commita62905aa4be418585647054bb1b6e2ff2f9171d2 (patch)
tree07d48fca35c4ee43cb5a55c2c3da68c50cf28d65 /libhb
parent146bb5a0fd7c051ecd61928ccc00e90d293e742c (diff)
when in cfr mode, tell x264 we are doing cfr and allow x264 to set the timebase to the framerate.
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://svn.handbrake.fr/HandBrake/trunk@3185 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/encx264.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/libhb/encx264.c b/libhb/encx264.c
index 566fc5504..407df689d 100644
--- a/libhb/encx264.c
+++ b/libhb/encx264.c
@@ -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;