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.
This commit is contained in:
Martin Pulec
2020-06-17 15:48:08 +02:00
parent 70cf9da646
commit 563e64106d

View File

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