You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avfilter: simplify processing child context options
THe call to av_opt_set() is redundant, since the option is written in the options dict, which is later passed to avfilter_init_dict().
This commit is contained in:
@@ -863,14 +863,11 @@ static int process_options(AVFilterContext *ctx, AVDictionary **options,
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
av_dict_set(options, key, value, 0);
|
av_dict_set(options, key, value, 0);
|
||||||
if ((ret = av_opt_set(ctx->priv, key, value, AV_OPT_SEARCH_CHILDREN)) < 0) {
|
|
||||||
if (!av_opt_find(ctx->priv, key, NULL, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) {
|
if (!av_opt_find(ctx->priv, key, NULL, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) {
|
||||||
if (ret == AVERROR_OPTION_NOT_FOUND)
|
|
||||||
av_log(ctx, AV_LOG_ERROR, "Option '%s' not found\n", key);
|
av_log(ctx, AV_LOG_ERROR, "Option '%s' not found\n", key);
|
||||||
av_free(value);
|
av_free(value);
|
||||||
av_free(parsed_key);
|
av_free(parsed_key);
|
||||||
return ret;
|
return AVERROR_OPTION_NOT_FOUND;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user