]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/nvenc: only enforce explicitly set twopass mode
authorTimo Rothenpieler <timo@rothenpieler.org>
Fri, 30 Oct 2020 16:26:32 +0000 (17:26 +0100)
committerTimo Rothenpieler <timo@rothenpieler.org>
Fri, 30 Oct 2020 16:27:03 +0000 (17:27 +0100)
libavcodec/nvenc.c

index b4a0a5bf0a38952b94eef2559ce8e89aa84a66d1..da8a3f5a67ba7de9286f148b5b0eeabe6531b054 100644 (file)
@@ -900,7 +900,7 @@ static av_cold void nvenc_setup_rate_control(AVCodecContext *avctx)
 
     if (ctx->flags & NVENC_ONE_PASS)
         ctx->encode_config.rcParams.multiPass = NV_ENC_MULTI_PASS_DISABLED;
-    if (ctx->flags & NVENC_TWO_PASSES || ctx->twopass)
+    if (ctx->flags & NVENC_TWO_PASSES || ctx->twopass > 0)
         ctx->encode_config.rcParams.multiPass = NV_ENC_TWO_PASS_FULL_RESOLUTION;
 
     if (ctx->rc < 0) {