mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
lavfi: do not warn inappropriately with aevalsrc.
This commit is contained in:
parent
937325f3db
commit
23a750c994
@ -763,6 +763,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque
|
|||||||
char *copy = av_strdup(args);
|
char *copy = av_strdup(args);
|
||||||
char *p = copy;
|
char *p = copy;
|
||||||
int nb_leading = 0; // number of leading colons to skip
|
int nb_leading = 0; // number of leading colons to skip
|
||||||
|
int deprecated = 0;
|
||||||
|
|
||||||
if (!copy) {
|
if (!copy) {
|
||||||
ret = AVERROR(ENOMEM);
|
ret = AVERROR(ENOMEM);
|
||||||
@ -784,12 +785,10 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque
|
|||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strchr(p, ':')) {
|
deprecated = strchr(p, ':') != NULL;
|
||||||
av_log(filter, AV_LOG_WARNING, "This syntax is deprecated. Use "
|
|
||||||
"'|' to separate the list items.\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!strcmp(filter->filter->name, "aevalsrc")) {
|
if (!strcmp(filter->filter->name, "aevalsrc")) {
|
||||||
|
deprecated = 0;
|
||||||
while ((p = strchr(p, ':')) && p[1] != ':') {
|
while ((p = strchr(p, ':')) && p[1] != ':') {
|
||||||
const char *epos = strchr(p + 1, '=');
|
const char *epos = strchr(p + 1, '=');
|
||||||
const char *spos = strchr(p + 1, ':');
|
const char *spos = strchr(p + 1, ':');
|
||||||
@ -798,14 +797,22 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque
|
|||||||
p++;
|
p++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
/* next token does not contain a '=', assume a channel expression */
|
||||||
|
deprecated = 1;
|
||||||
*p++ = '|';
|
*p++ = '|';
|
||||||
}
|
}
|
||||||
if (p && *p == ':')
|
if (p && *p == ':') { // double sep '::' found
|
||||||
|
deprecated = 1;
|
||||||
memmove(p, p + 1, strlen(p));
|
memmove(p, p + 1, strlen(p));
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
while ((p = strchr(p, ':')))
|
while ((p = strchr(p, ':')))
|
||||||
*p++ = '|';
|
*p++ = '|';
|
||||||
|
|
||||||
|
if (deprecated)
|
||||||
|
av_log(filter, AV_LOG_WARNING, "This syntax is deprecated. Use "
|
||||||
|
"'|' to separate the list items.\n");
|
||||||
|
|
||||||
av_log(filter, AV_LOG_DEBUG, "compat: called with args=[%s]\n", copy);
|
av_log(filter, AV_LOG_DEBUG, "compat: called with args=[%s]\n", copy);
|
||||||
ret = process_options(filter, &options, copy);
|
ret = process_options(filter, &options, copy);
|
||||||
av_freep(©);
|
av_freep(©);
|
||||||
|
Loading…
Reference in New Issue
Block a user