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

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

Unified · Split

libavfilter/avfilter.c+2−2
@@ -897,7 +897,7 @@ static int process_options(AVFilterContext *ctx, AVDictionary **options, · 896 unmodified lines
897 }897 }
898 } else {898 } else {
899 av_dict_set(options, key, value, 0);899 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) {
901 if (!av_opt_find(ctx->priv, key, NULL, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) {901 if (!av_opt_find(ctx->priv, key, NULL, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) {
902 if (ret == AVERROR_OPTION_NOT_FOUND)902 if (ret == AVERROR_OPTION_NOT_FOUND)
903 av_log(ctx, AV_LOG_ERROR, "Option '%s' not found\n", key);903 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
948 }948 }
949 949
950 if (ctx->filter->priv_class) {950 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);
952 if (ret < 0) {952 if (ret < 0) {
953 av_log(ctx, AV_LOG_ERROR, "Error applying options to the filter.\n");953 av_log(ctx, AV_LOG_ERROR, "Error applying options to the filter.\n");
954 return ret;954 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