Skip to content

Commit

Permalink
CI Linux FFmpeg: remove NVENC IDR patch
Browse files Browse the repository at this point in the history
Since the FFmpeg commit 7eeef72c6, the IDR period is set to gopLength
unconditinally even for intra-refresh mode, which is what the removed
patch did.

+ do not check if FFmpeg is patched (the macro is )
  • Loading branch information
MartinPulec committed Jul 17, 2023
1 parent bc25340 commit e457ab8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 57 deletions.

This file was deleted.

13 changes: 8 additions & 5 deletions src/video_compress/libavcodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1539,16 +1539,19 @@ static void configure_nvenc(AVCodecContext *codec_ctx, struct setparam_param *pa
}

set_forced_idr(codec_ctx, 1);
#ifdef PATCHED_FF_NVENC_NO_INFINITE_GOP
const bool patched_ff = true;
#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(60, 22, 100)
const bool new_ff = true;
#else
const bool patched_ff = false;
const bool new_ff = false;
if (param->periodic_intra != 0) {
LOG(LOG_LEVEL_WARNING) << MOD_NAME "FFmpeg not patched, " << (param->periodic_intra != 1 ? "not " : "") << "enabling Intra Refresh.\n";
LOG(LOG_LEVEL_WARNING) << MOD_NAME
"Old FFmpeg, " << (param->periodic_intra != 1 ? "not " : "")
<< "enabling Intra Refresh.\n";
}
#endif

if ((patched_ff && param->periodic_intra != 0) || param->periodic_intra == 1) {
if ((new_ff && param->periodic_intra != 0) ||
param->periodic_intra == 1) {
check_av_opt_set<int>(codec_ctx->priv_data, "intra-refresh", 1);
}

Expand Down

0 comments on commit e457ab8

Please sign in to comment.