]> git.sesse.net Git - x264/blobdiff - encoder/encoder.c
Add ability to signal to x264 when speedcontrol buffering is complete
[x264] / encoder / encoder.c
index a5bd0d9ff1a45d9bca5b68edcd9fc961325c68e0..4692d3ca5aca6dc76c310ce50f119c15bc34f004 100644 (file)
@@ -1272,6 +1272,8 @@ static int x264_validate_parameters( x264_t *h, int b_open )
     if( h->param.i_nal_hrd == X264_NAL_HRD_CBR )
         h->param.rc.b_filler = 1;
 
+    h->param.sc.max_preset = x264_clip3( h->param.sc.max_preset, 1, SC_PRESETS );
+
     /* ensure the booleans are 0 or 1 so they can be used in math */
 #define BOOLIFY(x) h->param.x = !!h->param.x
     BOOLIFY( b_cabac );