You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
lavfi: add error message to help users convert to new lavfi syntax.
This commit is contained in:
@@ -895,7 +895,7 @@ int avfilter_init_str(AVFilterContext *filter, const char *args)
|
|||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if FF_API_OLD_FILTER_OPTS
|
#if FF_API_OLD_FILTER_OPTS || FF_API_OLD_FILTER_OPTS_ERROR
|
||||||
if ( !strcmp(filter->filter->name, "format") ||
|
if ( !strcmp(filter->filter->name, "format") ||
|
||||||
!strcmp(filter->filter->name, "noformat") ||
|
!strcmp(filter->filter->name, "noformat") ||
|
||||||
!strcmp(filter->filter->name, "frei0r") ||
|
!strcmp(filter->filter->name, "frei0r") ||
|
||||||
@@ -955,12 +955,23 @@ int avfilter_init_str(AVFilterContext *filter, const char *args)
|
|||||||
while ((p = strchr(p, ':')))
|
while ((p = strchr(p, ':')))
|
||||||
*p++ = '|';
|
*p++ = '|';
|
||||||
|
|
||||||
|
#if FF_API_OLD_FILTER_OPTS
|
||||||
if (deprecated)
|
if (deprecated)
|
||||||
av_log(filter, AV_LOG_WARNING, "This syntax is deprecated. Use "
|
av_log(filter, AV_LOG_WARNING, "This syntax is deprecated. Use "
|
||||||
"'|' to separate the list items.\n");
|
"'|' 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);
|
||||||
|
#else
|
||||||
|
if (deprecated) {
|
||||||
|
av_log(filter, AV_LOG_ERROR, "This syntax is deprecated. Use "
|
||||||
|
"'|' to separate the list items ('%s' instead of '%s')\n",
|
||||||
|
copy, args);
|
||||||
|
ret = AVERROR(EINVAL);
|
||||||
|
} else {
|
||||||
|
ret = process_options(filter, &options, copy);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
av_freep(©);
|
av_freep(©);
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
@@ -61,6 +61,9 @@
|
|||||||
#ifndef FF_API_OLD_FILTER_OPTS
|
#ifndef FF_API_OLD_FILTER_OPTS
|
||||||
#define FF_API_OLD_FILTER_OPTS (LIBAVFILTER_VERSION_MAJOR < 6)
|
#define FF_API_OLD_FILTER_OPTS (LIBAVFILTER_VERSION_MAJOR < 6)
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef FF_API_OLD_FILTER_OPTS_ERROR
|
||||||
|
#define FF_API_OLD_FILTER_OPTS_ERROR (LIBAVFILTER_VERSION_MAJOR < 7)
|
||||||
|
#endif
|
||||||
#ifndef FF_API_AVFILTER_OPEN
|
#ifndef FF_API_AVFILTER_OPEN
|
||||||
#define FF_API_AVFILTER_OPEN (LIBAVFILTER_VERSION_MAJOR < 6)
|
#define FF_API_AVFILTER_OPEN (LIBAVFILTER_VERSION_MAJOR < 6)
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user