nvenc: Update check for lookahead
authorRuta Gadkari <rgadkari@nvidia.com>
Mon, 19 Dec 2016 11:14:04 +0000 (16:44 +0530)
committerLuca Barbato <lu_zero@gentoo.org>
Wed, 21 Dec 2016 05:16:52 +0000 (06:16 +0100)
By default it is -1.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavcodec/nvenc.c

index d5bfd74..4054e43 100644 (file)
@@ -623,7 +623,7 @@ static 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->config.frameIntervalP - 4;