summaryrefslogtreecommitdiff
path: root/libavfilter/avfilter.c
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2017-07-30 16:57:12 +0200
committerNicolas George <george@nsup.org>2017-08-29 10:19:04 +0200
commitdfa3aaa22a2bac6c98ed0eb4a42cd93347d9a954 (patch)
treebc018e664cb091e66539f9cf59ed7a5c462eda27 /libavfilter/avfilter.c
parentf8d7b5febba075035a94de5d7d1dc9083ad2f3ed (diff)
downloadffmpeg-dfa3aaa22a2bac6c98ed0eb4a42cd93347d9a954.tar.gz
lavfi: search options on child objects.
The child objects must be allocated and inited in the preinit() callback.
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r--libavfilter/avfilter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index dcd975e104..6a97456054 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -897,7 +897,7 @@ 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, 0)) < 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);
@@ -948,7 +948,7 @@ int avfilter_init_dict(AVFilterContext *ctx, AVDictionary **options)
}
if (ctx->filter->priv_class) {
- ret = av_opt_set_dict(ctx->priv, options);
+ ret = av_opt_set_dict2(ctx->priv, options, AV_OPT_SEARCH_CHILDREN);
if (ret < 0) {
av_log(ctx, AV_LOG_ERROR, "Error applying options to the filter.\n");
return ret;