Browse Source

Fix CBR for x264 versions under 139

According to issue #204 on the obs-studio repository, always setting the
ABR rate control method fixes the issue.  I checked, and this was and
issue, and that does seem to fix the issue properly.
jp9000 11 years ago
parent
commit
32e668438d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      plugins/obs-x264/obs-x264.c

+ 1 - 1
plugins/obs-x264/obs-x264.c

@@ -274,10 +274,10 @@ static void update_params(struct obs_x264 *obsx264, obs_data_t settings,
 	 * the bitrate */
 	if (cbr) {
 		obsx264->params.rc.f_rf_constant = 0.0f;
+		obsx264->params.rc.i_rc_method   = X264_RC_ABR;
 
 #if X264_BUILD >= 139
 		obsx264->params.rc.b_filler      = true;
-		obsx264->params.rc.i_rc_method   = X264_RC_ABR;
 #else
 		obsx264->params.i_nal_hrd        = X264_NAL_HRD_CBR;
 #endif