Skip to content

Commit 06f74f7

Browse files
committed
lavc NVENC: warn if FFmpeg is not patched
1 parent 419afb0 commit 06f74f7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/video_compress/libavcodec.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,10 +1870,15 @@ static void configure_nvenc(AVCodecContext *codec_ctx, struct setparam_param *pa
18701870

18711871
set_forced_idr(codec_ctx, 1);
18721872
#ifdef PATCHED_FF_NVENC_NO_INFINITE_GOP
1873-
if (param->periodic_intra != 0) {
1873+
const bool patched_ff = true;
18741874
#else
1875-
if (param->periodic_intra == 1) {
1875+
const bool patched_ff = false;
1876+
if (param->periodic_intra != 0) {
1877+
LOG(LOG_LEVEL_WARNING) << MOD_NAME "FFmpeg not patched, " << (param->periodic_intra != 1 ? "not " : "") << "enabling Intra Refresh.\n";
1878+
}
18761879
#endif
1880+
1881+
if ((patched_ff && param->periodic_intra != 0) || param->periodic_intra == 1) {
18771882
check_av_opt_set<int>(codec_ctx->priv_data, "intra-refresh", 1);
18781883
}
18791884

0 commit comments

Comments
 (0)