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().
Unified · Split
| @@ -863,14 +863,11 @@ static int process_options(AVFilterContext *ctx, AVDictionary **options, · 862 unmodified lines | ||
| 863 | 863 | } |
| 864 | 864 | } else { |
| 865 | 865 | av_dict_set(options, key, value, 0); |
| 866 | − if ((ret = av_opt_set(ctx->priv, key, value, AV_OPT_SEARCH_CHILDREN)) < 0) { | |
| 867 | − if (!av_opt_find(ctx->priv, key, NULL, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) { | |
| 868 | − if (ret == AVERROR_OPTION_NOT_FOUND) | |
| 869 | − av_log(ctx, AV_LOG_ERROR, "Option '%s' not found\n", key); | |
| 870 | − av_free(value); | |
| 871 | − av_free(parsed_key); | |
| 872 | − return ret; | |
| 873 | − } | |
| 866 | + 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 | + av_free(value); | |
| 869 | + av_free(parsed_key); | |
| 870 | + return AVERROR_OPTION_NOT_FOUND; | |
| 874 | 871 | } |
| 875 | 872 | } |
| 876 | 873 | |