mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/vf_scale+aresample: minor simpification
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
6d246f440e
commit
ec0e0eb4c1
|
@ -59,9 +59,7 @@ static av_cold int init_dict(AVFilterContext *ctx, AVDictionary **opts)
|
||||||
AVDictionaryEntry *e = NULL;
|
AVDictionaryEntry *e = NULL;
|
||||||
|
|
||||||
while ((e = av_dict_get(*opts, "", e, AV_DICT_IGNORE_SUFFIX))) {
|
while ((e = av_dict_get(*opts, "", e, AV_DICT_IGNORE_SUFFIX))) {
|
||||||
const char *token = e->key;
|
if ((ret = av_opt_set(aresample->swr, e->key, e->value, 0)) < 0)
|
||||||
const char *value = e->value;
|
|
||||||
if ((ret = av_opt_set(aresample->swr, token, value, 0)) < 0)
|
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
av_dict_free(opts);
|
av_dict_free(opts);
|
||||||
|
|
|
@ -333,9 +333,7 @@ static int config_props(AVFilterLink *outlink)
|
||||||
AVDictionaryEntry *e = NULL;
|
AVDictionaryEntry *e = NULL;
|
||||||
|
|
||||||
while ((e = av_dict_get(scale->opts, "", e, AV_DICT_IGNORE_SUFFIX))) {
|
while ((e = av_dict_get(scale->opts, "", e, AV_DICT_IGNORE_SUFFIX))) {
|
||||||
const char *token = e->key;
|
if ((ret = av_opt_set(*s, e->key, e->value, 0)) < 0)
|
||||||
const char *value = e->value;
|
|
||||||
if ((ret = av_opt_set(*s, token, value, 0)) < 0)
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue