aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/avfilter.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-04-11 16:49:33 +0200
committerClément Bœsch <ubitux@gmail.com>2013-04-11 17:28:02 +0200
commit64ce15b9f433a59e11183fddc89324ca0afcb2b8 (patch)
tree94dae671eed923f428a183700344ba86a544ffae /libavfilter/avfilter.c
parent94d13df34c2db532ab0c1a2916984a38e610d592 (diff)
downloadffmpeg-64ce15b9f433a59e11183fddc89324ca0afcb2b8.tar.gz
lavfi/aevalsrc: switch to an AVOptions-based system.
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r--libavfilter/avfilter.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 3f69836dbe..18efe80e55 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -674,7 +674,6 @@ static int process_options(AVFilterContext *ctx, AVDictionary **options,
static const char *const filters_left_to_update[] = {
"abuffer",
"aconvert",
- "aevalsrc",
"amerge",
"aresample",
"atempo",
@@ -757,7 +756,8 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque
!strcmp(filter->filter->name, "frei0r") ||
!strcmp(filter->filter->name, "frei0r_src") ||
!strcmp(filter->filter->name, "ocv") ||
- !strcmp(filter->filter->name, "pp")) {
+ !strcmp(filter->filter->name, "pp") ||
+ !strcmp(filter->filter->name, "aevalsrc")) {
/* a hack for compatibility with the old syntax
* replace colons with |s */
char *copy = av_strdup(args);
@@ -789,9 +789,24 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque
"'|' to separate the list items.\n");
}
+ if (!strcmp(filter->filter->name, "aevalsrc")) {
+ while ((p = strchr(p, ':')) && p[1] != ':') {
+ const char *epos = strchr(p + 1, '=');
+ const char *spos = strchr(p + 1, ':');
+ const int next_token_is_opt = epos && (!spos || epos < spos);
+ if (next_token_is_opt) {
+ p++;
+ break;
+ }
+ *p++ = '|';
+ }
+ if (p && *p == ':')
+ memmove(p, p + 1, strlen(p));
+ } else
while ((p = strchr(p, ':')))
*p++ = '|';
+ av_log(filter, AV_LOG_DEBUG, "compat: called with args=[%s]\n", copy);
ret = process_options(filter, &options, copy);
av_freep(&copy);