From 5914efe709e8be23a05253d96bf1eb2cfaa0c83c Mon Sep 17 00:00:00 2001 From: Fiona Glaser Date: Wed, 30 Jul 2008 15:28:21 -0600 Subject: [PATCH] Basic sanity checking of qpmax/qpmin options --- encoder/encoder.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/encoder/encoder.c b/encoder/encoder.c index cb2d0ce0..76fd1454 100644 --- a/encoder/encoder.c +++ b/encoder/encoder.c @@ -421,6 +421,8 @@ static int x264_validate_parameters( x264_t *h ) h->param.rc.i_qp_max = x264_clip3( (int)(X264_MAX3( qp_p, qp_i, qp_b ) + .999), 0, 51 ); h->param.rc.i_aq_mode = 0; } + h->param.rc.i_qp_max = x264_clip3( h->param.rc.i_qp_max, 0, 51 ); + h->param.rc.i_qp_min = x264_clip3( h->param.rc.i_qp_min, 0, h->param.rc.i_qp_max ); if( ( h->param.i_width % 16 || h->param.i_height % 16 ) && h->param.i_height != 1080 && !h->mb.b_lossless ) -- 2.50.1