diff mbox series

[FFmpeg-devel,4/8] lavfi/avfilter: export a multikey dict from process_options()

Message ID 20230108125811.17967-4-anton@khirnov.net
State Accepted
Commit b6ba764552c94bed7339ea34ef64bb1dc37c0956
Headers show
Series [FFmpeg-devel,1/8] lavfi/vf_scale: allow passing options to swscale directly | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov Jan. 8, 2023, 12:58 p.m. UTC
This way the function does not need to be able to match keys to
AVOptions, which will be useful in future commits.
---
 libavfilter/avfilter.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 689c91891e..278d5868de 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -850,17 +850,7 @@  static int process_options(AVFilterContext *ctx, AVDictionary **options,
                 return ret;
             }
         } else {
-            o = av_opt_find(ctx->priv, key, NULL, 0,
-                            AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ);
-            if (!o) {
-                av_log(ctx, AV_LOG_ERROR, "Option '%s' not found\n", key);
-                av_free(value);
-                av_free(parsed_key);
-                return AVERROR_OPTION_NOT_FOUND;
-            }
-            av_dict_set(options, key, value,
-                        (o->type == AV_OPT_TYPE_FLAGS &&
-                         (value[0] == '-' || value[0] == '+')) ? AV_DICT_APPEND : 0);
+            av_dict_set(options, key, value, AV_DICT_MULTIKEY);
         }
 
         av_free(value);