aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/avfilter.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-01-07 13:36:15 +0100
committerAnton Khirnov <anton@khirnov.net>2023-01-10 11:52:02 +0100
commitd234b4b193e017411e179c7a1d0521a6fa6dbc8d (patch)
tree96cd50275a6f5cab7ef6ede51e379929d0b9869d /libavfilter/avfilter.c
parentb6ba764552c94bed7339ea34ef64bb1dc37c0956 (diff)
downloadffmpeg-d234b4b193e017411e179c7a1d0521a6fa6dbc8d.tar.gz
lavfi/avfilter: simplify process_options()
This function currently treats AVFilterContext options and filter-private options differently: the former are immediately applied, while the latter are stored in a dictionary to be applied later. There is no good reason for having two branches - storing all options in the dictionary is simpler and achieves the same effect (since it is later applied with av_opt_set_dict()). This will also be useful in future commits.
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r--libavfilter/avfilter.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 278d5868de..43dfb11bdb 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -842,16 +842,7 @@ static int process_options(AVFilterContext *ctx, AVDictionary **options,
av_log(ctx, AV_LOG_DEBUG, "Setting '%s' to value '%s'\n", key, value);
- if (av_opt_find(ctx, key, NULL, 0, 0)) {
- ret = av_opt_set(ctx, key, value, 0);
- if (ret < 0) {
- av_free(value);
- av_free(parsed_key);
- return ret;
- }
- } else {
- av_dict_set(options, key, value, AV_DICT_MULTIKEY);
- }
+ av_dict_set(options, key, value, AV_DICT_MULTIKEY);
av_free(value);
av_free(parsed_key);