lavc: intra-refresh fix

This commit is contained in:
Martin Pulec
2022-04-12 07:58:48 +02:00
parent 443a38bd85
commit 59ac7e486e

View File

@@ -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);
}