diff options
author | Anton Khirnov <anton@khirnov.net> | 2022-03-10 11:26:47 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2022-03-22 18:49:43 +0100 |
commit | a0f04433f4fcca3ccc35cbccd34943bb7333221f (patch) | |
tree | 707494012cdc51686050ef9a34b5ca0c7980e823 | |
parent | 303ddab7eaf88a1dca6c3d1b1b89afa6d9905a7e (diff) | |
download | ffmpeg-a0f04433f4fcca3ccc35cbccd34943bb7333221f.tar.gz |
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().
-rw-r--r-- | libavfilter/avfilter.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 8f4e916a3c..3fdbcd489c 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -863,14 +863,11 @@ static int process_options(AVFilterContext *ctx, AVDictionary **options, } } else { 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 (ret == AVERROR_OPTION_NOT_FOUND) - av_log(ctx, AV_LOG_ERROR, "Option '%s' not found\n", key); - av_free(value); - av_free(parsed_key); - return ret; - } + if (!av_opt_find(ctx->priv, key, NULL, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) { + av_log(ctx, AV_LOG_ERROR, "Option '%s' not found\n", key); + av_free(value); + av_free(parsed_key); + return AVERROR_OPTION_NOT_FOUND; } } |