NVENC: Update check for Lookahead
authorRuta Gadkari <rgadkari@nvidia.com>
Mon, 26 Dec 2016 07:49:16 +0000 (13:19 +0530)
committerJames Almer <jamrial@gmail.com>
Mon, 26 Dec 2016 15:13:39 +0000 (12:13 -0300)
Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
libavcodec/nvenc.c

index 476a53e..f64fd8a 100644 (file)
@@ -695,7 +695,7 @@ static av_cold void nvenc_setup_rate_control(AVCodecContext *avctx)
         av_log(avctx, AV_LOG_VERBOSE, "Temporal AQ enabled.\n");
     }
 
-    if (ctx->rc_lookahead) {
+    if (ctx->rc_lookahead > 0) {
         int lkd_bound = FFMIN(ctx->nb_surfaces, ctx->async_depth) -
                         ctx->encode_config.frameIntervalP - 4;