History

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().

Anton Khirnov committed 4 years ago

Commit a0f04431 parent 303ddab1 file · +5 −8Browse files

Showing the changes to libavfilter/avfilter.c (1 of 1 file). Show all

Unified · Split

libavfilter/avfilter.c+5−8
@@ -863,14 +863,11 @@ static int process_options(AVFilterContext *ctx, AVDictionary **options, · 862 unmodified lines
863863 }
864864 } else {
865865 av_dict_set(options, key, value, 0);
866− if ((ret = av_opt_set(ctx->priv, key, value, AV_OPT_SEARCH_CHILDREN)) < 0) {
867− if (!av_opt_find(ctx->priv, key, NULL, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) {
868− if (ret == AVERROR_OPTION_NOT_FOUND)
869− av_log(ctx, AV_LOG_ERROR, "Option '%s' not found\n", key);
870− av_free(value);
871− av_free(parsed_key);
872− return ret;
873− }
866+ if (!av_opt_find(ctx->priv, key, NULL, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) {
867+ av_log(ctx, AV_LOG_ERROR, "Option '%s' not found\n", key);
868+ av_free(value);
869+ av_free(parsed_key);
870+ return AVERROR_OPTION_NOT_FOUND;
874871 }
875872 }
876873

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t