diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index e8b57e43be..14ed0d22e6 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -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;