]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/nvenc: Fix forcing constqp rc mode
authorTimo Rothenpieler <timo@rothenpieler.org>
Tue, 31 May 2016 14:53:38 +0000 (16:53 +0200)
committerTimo Rothenpieler <timo@rothenpieler.org>
Tue, 31 May 2016 14:53:38 +0000 (16:53 +0200)
The CONSTQP enum value is 0, so this check failed for it.

libavcodec/nvenc.c

index e8b57e43be5a19485f36f81d84f17b141994e5c7..14ed0d22e60127bb50276a7a4285a862f0a28335 100644 (file)
@@ -651,7 +651,7 @@ static av_cold void nvenc_setup_rate_control(AVCodecContext *avctx)
 
     if (ctx->flags & NVENC_LOSSLESS) {
         set_lossless(avctx);
-    } else if (ctx->rc > 0) {
+    } else if (ctx->rc >= 0) {
         nvenc_override_rate_control(avctx);
     } else {
         ctx->encode_config.rcParams.rateControlMode = NV_ENC_PARAMS_RC_VBR;