]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/libx264.c
Merge commit '373a6dda5422186bc057297342a9e559a564595e'
[ffmpeg] / libavcodec / libx264.c
index 5d1e203a7fed11fd8160e31eec04a2e152117a5e..edf6fc6130c4a698355ba8611319fc1b2116931a 100644 (file)
@@ -207,8 +207,8 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
             x264_encoder_reconfig(x4->enc, &x4->params);
         }
 
-        if (x4->params.rc.i_rc_method == X264_RC_CRF &&
-            x4->crf >= 0 &&
+        if (x4->crf >= 0 &&
+            x4->params.rc.i_rc_method == X264_RC_CRF &&
             x4->params.rc.f_rf_constant != x4->crf) {
             x4->params.rc.f_rf_constant = x4->crf;
             x264_encoder_reconfig(x4->enc, &x4->params);