THe call to av_opt_set() is redundant, since the option is written in the options dict, which is later passed to avfilter_init_dict().
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -863,14 +863,11 @@ static int process_options(AVFilterContext *ctx, AVDictionary **options, · 862 unmodified lines | |||
| 863 | } | 863 | } |
| 864 | } else { | 864 | } else { |
| 865 | av_dict_set(options, key, value, 0); | 865 | av_dict_set(options, key, value, 0); |
| 866 | if ((ret = av_opt_set(ctx->priv, key, value, AV_OPT_SEARCH_CHILDREN)) < 0) { | 866 | if (!av_opt_find(ctx->priv, key, NULL, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) { |
| 867 | if (!av_opt_find(ctx->priv, key, NULL, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) { | 867 | av_log(ctx, AV_LOG_ERROR, "Option '%s' not found\n", key); |
| 868 | if (ret == AVERROR_OPTION_NOT_FOUND) | 868 | av_free(value); |
| 869 | av_log(ctx, AV_LOG_ERROR, "Option '%s' not found\n", key); | 869 | av_free(parsed_key); |
| 870 | av_free(value); | 870 | return AVERROR_OPTION_NOT_FOUND; |
| 871 | av_free(parsed_key); | ||
| 872 | return ret; | ||
| 873 | } | ||
| 874 | } | 871 | } |
| 875 | } | 872 | } |
| 876 | 873 | ||