From 59ac7e486eb55571dfa205cc92b2eccc18615bd3 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Tue, 12 Apr 2022 07:58:48 +0200 Subject: [PATCH] lavc: intra-refresh fix --- src/video_compress/libavcodec.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video_compress/libavcodec.cpp b/src/video_compress/libavcodec.cpp index 194b8ba6c..b723684a3 100644 --- a/src/video_compress/libavcodec.cpp +++ b/src/video_compress/libavcodec.cpp @@ -1791,7 +1791,7 @@ static void configure_qsv(AVCodecContext *codec_ctx, struct setparam_param *para if (ret != 0) { log_msg(LOG_LEVEL_WARNING, "[lavc] Unable to set unset look-ahead.\n"); } - if (param->no_periodic_intra != 0) { + if (param->periodic_intra != 0) { ret = av_opt_set(codec_ctx->priv_data, "int_ref_type", "vertical", 0); if (ret != 0) { log_msg(LOG_LEVEL_WARNING, "[lavc] Unable to set intra refresh.\n"); @@ -1841,7 +1841,7 @@ static void configure_nvenc(AVCodecContext *codec_ctx, struct setparam_param *pa } set_forced_idr(codec_ctx, 1); - if (param->no_periodic_intra == 1) { + if (param->periodic_intra == 1) { if (int ret = av_opt_set(codec_ctx->priv_data, "intra-refresh", "1", 0) != 0) { print_libav_error(LOG_LEVEL_WARNING, "[lavc] Unable to set Intra Refresh", ret); }