]> git.videolan.org Git - x264.git/commitdiff
Fix reconfiguring to crf=0
authorAnton Mitrofanov <BugMaster@narod.ru>
Fri, 12 Oct 2012 19:43:40 +0000 (23:43 +0400)
committerJason Garrett-Glaser <jason@x264.com>
Wed, 7 Nov 2012 22:48:37 +0000 (14:48 -0800)
Lossless mode can't currently be enabled mid-stream.

encoder/encoder.c

index 095fef3f5958ee6eb710a234802fa5b7371ae2d0..2e23d74896bccc3b052f6b6119a739a352e9ea7e 100644 (file)
@@ -577,7 +577,7 @@ static int x264_validate_parameters( x264_t *h, int b_open )
         h->param.rc.i_qp_constant = h->param.rc.f_rf_constant + QP_BD_OFFSET;
         h->param.rc.i_bitrate = 0;
     }
-    if( (h->param.rc.i_rc_method == X264_RC_CQP || h->param.rc.i_rc_method == X264_RC_CRF)
+    if( b_open && (h->param.rc.i_rc_method == X264_RC_CQP || h->param.rc.i_rc_method == X264_RC_CRF)
         && h->param.rc.i_qp_constant == 0 )
     {
         h->mb.b_lossless = 1;