History

lavfi: search options on child objects.

The child objects must be allocated and inited in the preinit() callback.

Nicolas George committed 9 years ago

Commit dfa3aaa1 parent f8d7b5f1 file · +2 −2Browse files

Unified · Split

libavfilter/avfilter.c+2−2
@@ -897,7 +897,7 @@ static int process_options(AVFilterContext *ctx, AVDictionary **options, · 896 unmodified lines
897897 }
898898 } else {
899899 av_dict_set(options, key, value, 0);
900− if ((ret = av_opt_set(ctx->priv, key, value, 0)) < 0) {
900+ if ((ret = av_opt_set(ctx->priv, key, value, AV_OPT_SEARCH_CHILDREN)) < 0) {
901901 if (!av_opt_find(ctx->priv, key, NULL, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) {
902902 if (ret == AVERROR_OPTION_NOT_FOUND)
903903 av_log(ctx, AV_LOG_ERROR, "Option '%s' not found\n", key);
@@ -948,7 +948,7 @@ int avfilter_init_dict(AVFilterContext *ctx, AVDictionary **options) · 44 unmodified lines
948948 }
949949
950950 if (ctx->filter->priv_class) {
951− ret = av_opt_set_dict(ctx->priv, options);
951+ ret = av_opt_set_dict2(ctx->priv, options, AV_OPT_SEARCH_CHILDREN);
952952 if (ret < 0) {
953953 av_log(ctx, AV_LOG_ERROR, "Error applying options to the filter.\n");
954954 return ret;

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