diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2016-12-05 12:38:32 -0500 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2017-03-23 09:57:32 +0100 |
commit | 88fd836a015a5f3380df74592e440e7d1e5b8000 (patch) | |
tree | a166dec6a16c86fcdcf3b49681697d085b049a9e /libavfilter/avfilter.c | |
parent | 07a2b155949eb267cdfc7805f42c7b3375f9c7c5 (diff) | |
download | ffmpeg-88fd836a015a5f3380df74592e440e7d1e5b8000.tar.gz |
lavfi: Drop deprecated way of passing options for a few filters
Deprecated in 02/2013.
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r-- | libavfilter/avfilter.c | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 99531e5690..d9c204e766 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -624,87 +624,11 @@ int avfilter_init_str(AVFilterContext *filter, const char *args) return AVERROR(EINVAL); } -#if FF_API_OLD_FILTER_OPTS - if (!strcmp(filter->filter->name, "scale") && - strchr(args, ':') && strchr(args, ':') < strchr(args, '=')) { - /* old w:h:flags=<flags> syntax */ - char *copy = av_strdup(args); - char *p; - - av_log(filter, AV_LOG_WARNING, "The <w>:<h>:flags=<flags> option " - "syntax is deprecated. Use either <w>:<h>:<flags> or " - "w=<w>:h=<h>:flags=<flags>.\n"); - - if (!copy) { - ret = AVERROR(ENOMEM); - goto fail; - } - - p = strrchr(copy, ':'); - if (p) { - *p++ = 0; - ret = av_dict_parse_string(&options, p, "=", ":", 0); - } - if (ret >= 0) - ret = process_unnamed_options(filter, &options, copy); - av_freep(©); - - if (ret < 0) - goto fail; - } else -#endif - if (strchr(args, '=')) { /* assume a list of key1=value1:key2=value2:... */ ret = av_dict_parse_string(&options, args, "=", ":", 0); if (ret < 0) goto fail; -#if FF_API_OLD_FILTER_OPTS - } else if (!strcmp(filter->filter->name, "format") || - !strcmp(filter->filter->name, "noformat") || - !strcmp(filter->filter->name, "frei0r") || - !strcmp(filter->filter->name, "frei0r_src") || - !strcmp(filter->filter->name, "ocv")) { - /* a hack for compatibility with the old syntax - * replace colons with |s */ - char *copy = av_strdup(args); - char *p = copy; - int nb_leading = 0; // number of leading colons to skip - - if (!copy) { - ret = AVERROR(ENOMEM); - goto fail; - } - - if (!strcmp(filter->filter->name, "frei0r") || - !strcmp(filter->filter->name, "ocv")) - nb_leading = 1; - else if (!strcmp(filter->filter->name, "frei0r_src")) - nb_leading = 3; - - while (nb_leading--) { - p = strchr(p, ':'); - if (!p) { - p = copy + strlen(copy); - break; - } - p++; - } - - if (strchr(p, ':')) { - av_log(filter, AV_LOG_WARNING, "This syntax is deprecated. Use " - "'|' to separate the list items.\n"); - } - - while ((p = strchr(p, ':'))) - *p++ = '|'; - - ret = process_unnamed_options(filter, &options, copy); - av_freep(©); - - if (ret < 0) - goto fail; -#endif } else { ret = process_unnamed_options(filter, &options, args); if (ret < 0) |