Index: opal-3.6.6/plugins/video/H.264/gpl/enc-ctx.cxx
===================================================================
--- opal-3.6.6.orig/plugins/video/H.264/gpl/enc-ctx.cxx
+++ opal-3.6.6/plugins/video/H.264/gpl/enc-ctx.cxx
@@ -163,7 +163,7 @@ void X264EncoderContext::SetFrameRate(un
 void X264EncoderContext::SetTSTO (unsigned tsto)
 {
     _context.rc.i_qp_min = H264_MIN_QUANT;
-    _context.rc.i_qp_max = round ( (double)(51 - H264_MIN_QUANT) / 31 * tsto + H264_MIN_QUANT);
+    _context.rc.i_qp_max = tsto;
     _context.rc.i_qp_step = 4;	    
 }
 
@@ -194,6 +194,10 @@ void X264EncoderContext::SetProfileLevel
   // baseline profile begin
   _context.b_cabac = 0;  // Only >= MAIN LEVEL
   _context.i_bframe = 0; // Only >= MAIN LEVEL
+  _context.i_nal_hrd = X264_NAL_HRD_CBR;
+  _context.i_sync_lookahead = 0;
+  _context.b_vfr_input = 0;
+  _context.rc.i_lookahead = 0;
 
   // Level:
   _context.i_level_idc = level;
