From 563e64106dc3ee49fd55c4d207df4db50bf4575f Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Wed, 17 Jun 2020 15:48:08 +0200 Subject: [PATCH] Lavc: fixed incorrectly set intra-refresh for libx264 For x264, intra-refresh option was not set at all. Instead it was set for x265 which doesn't support it in this way. --- src/video_compress/libavcodec.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_compress/libavcodec.cpp b/src/video_compress/libavcodec.cpp index 87ebc02b6..d56bd700a 100644 --- a/src/video_compress/libavcodec.cpp +++ b/src/video_compress/libavcodec.cpp @@ -1635,7 +1635,7 @@ static void configure_x264_x265(AVCodecContext *codec_ctx, struct setparam_param /// turn on periodic intra refresh, unless explicitely disabled if (!param->no_periodic_intra){ codec_ctx->refs = 1; - if(strncmp(codec_ctx->codec->name, "libx264", strlen("libx264"))){ + if (strcmp(codec_ctx->codec->name, "libx264") == 0) { int ret = av_opt_set(codec_ctx->priv_data, "intra-refresh", "1", 0); if (ret != 0) { print_libav_error(LOG_LEVEL_WARNING, "[lavc] Unable to set Intra Refresh", ret);