diff mbox series

[FFmpeg-devel,v2,09/31] avfilter/vf_coreimage: use av_dict_iterate

Message ID 20221126144648.73162-10-epirat07@gmail.com
State Accepted
Headers show
Series Use av_dict_iterate where approproate | 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

Marvin Scholz Nov. 26, 2022, 2:46 p.m. UTC
---
 libavfilter/vf_coreimage.m | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/vf_coreimage.m b/libavfilter/vf_coreimage.m
index 874bdc8c56..b1959861de 100644
--- a/libavfilter/vf_coreimage.m
+++ b/libavfilter/vf_coreimage.m
@@ -416,8 +416,8 @@  static void set_option(CoreImageContext *ctx, CIFilter *filter, const char *key,
 
     // set user options
     if (filter_options) {
-        AVDictionaryEntry *o = NULL;
-        while ((o = av_dict_get(filter_options, "", o, AV_DICT_IGNORE_SUFFIX))) {
+        const AVDictionaryEntry *o = NULL;
+        while ((o = av_dict_iterate(filter_options, o))) {
             set_option(ctx, filter, o->key, o->value);
         }
     }
@@ -427,10 +427,10 @@  static void set_option(CoreImageContext *ctx, CIFilter *filter, const char *key,
 
 static av_cold int init(AVFilterContext *fctx)
 {
-    CoreImageContext *ctx     = fctx->priv;
-    AVDictionary *filter_dict = NULL;
-    AVDictionaryEntry *f      = NULL;
-    AVDictionaryEntry *o      = NULL;
+    CoreImageContext *ctx       = fctx->priv;
+    AVDictionary *filter_dict   = NULL;
+    const AVDictionaryEntry *f  = NULL;
+    const AVDictionaryEntry *o  = NULL;
     int ret;
     int i;
 
@@ -460,7 +460,7 @@  static av_cold int init(AVFilterContext *fctx)
 
         // parse filters for option key-value pairs (opt=val@opt2=val2) separated by @
         i = 0;
-        while ((f = av_dict_get(filter_dict, "", f, AV_DICT_IGNORE_SUFFIX))) {
+        while ((f = av_dict_iterate(filter_dict, f))) {
             AVDictionary *filter_options = NULL;
 
             if (strncmp(f->value, "default", 7)) { // not default
@@ -477,7 +477,7 @@  static av_cold int init(AVFilterContext *fctx)
                 if (!filter_options) {
                     av_log(ctx, AV_LOG_DEBUG, "\tusing default options\n");
                 } else {
-                    while ((o = av_dict_get(filter_options, "", o, AV_DICT_IGNORE_SUFFIX))) {
+                    while ((o = av_dict_iterate(filter_options, o))) {
                         av_log(ctx, AV_LOG_DEBUG, "\t%s: %s\n", o->key, o->value);
                     }
                 }