OSDN Git Service

avfilter/vf_scale+aresample: minor simpification
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 16 Aug 2013 02:25:39 +0000 (04:25 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 16 Aug 2013 02:26:59 +0000 (04:26 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/af_aresample.c
libavfilter/vf_scale.c

index b88c5f8..dbeb0de 100644 (file)
@@ -59,9 +59,7 @@ static av_cold int init_dict(AVFilterContext *ctx, AVDictionary **opts)
         AVDictionaryEntry *e = NULL;
 
         while ((e = av_dict_get(*opts, "", e, AV_DICT_IGNORE_SUFFIX))) {
-            const char *token = e->key;
-            const char *value = e->value;
-            if ((ret = av_opt_set(aresample->swr, token, value, 0)) < 0)
+            if ((ret = av_opt_set(aresample->swr, e->key, e->value, 0)) < 0)
                 goto end;
         }
         av_dict_free(opts);
index c8ceedf..d764d21 100644 (file)
@@ -333,9 +333,7 @@ static int config_props(AVFilterLink *outlink)
                 AVDictionaryEntry *e = NULL;
 
                 while ((e = av_dict_get(scale->opts, "", e, AV_DICT_IGNORE_SUFFIX))) {
-                    const char *token = e->key;
-                    const char *value = e->value;
-                    if ((ret = av_opt_set(*s, token, value, 0)) < 0)
+                    if ((ret = av_opt_set(*s, e->key, e->value, 0)) < 0)
                         return ret;
                 }
             }