mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
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.
This commit is contained in:
parent
b6ba764552
commit
d234b4b193
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user