aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-11 02:33:31 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-04-11 02:37:43 +0200
commit42c70b358418cb0a364f9b12954b93d6d29be7fb (patch)
tree6452b40c7720ed42fe6c44d550f949ff79fcd828 /libavfilter
parent5e5ef6e8aecd299e4550e6c59ae5ce8db27358de (diff)
parentdd7fc37c71955b78a2687f29e871f714d18de386 (diff)
downloadffmpeg-42c70b358418cb0a364f9b12954b93d6d29be7fb.tar.gz
Merge commit 'dd7fc37c71955b78a2687f29e871f714d18de386'
* commit 'dd7fc37c71955b78a2687f29e871f714d18de386': af_join: switch to an AVOptions-based system. Conflicts: doc/filters.texi libavfilter/af_join.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/af_join.c18
-rw-r--r--libavfilter/avfilter.c1
2 files changed, 12 insertions, 7 deletions
diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c
index ac3b76ca9d..cba400225b 100644
--- a/libavfilter/af_join.c
+++ b/libavfilter/af_join.c
@@ -103,14 +103,23 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
static int parse_maps(AVFilterContext *ctx)
{
JoinContext *s = ctx->priv;
+ char separator = '|';
char *cur = s->map;
+#if FF_API_OLD_FILTER_OPTS
+ if (cur && strchr(cur, ',')) {
+ av_log(ctx, AV_LOG_WARNING, "This syntax is deprecated, use '|' to "
+ "separate the mappings.\n");
+ separator = ',';
+ }
+#endif
+
while (cur && *cur) {
char *sep, *next, *p;
uint64_t in_channel = 0, out_channel = 0;
int input_idx, out_ch_idx, in_ch_idx;
- next = strchr(cur, ',');
+ next = strchr(cur, separator);
if (next)
*next++ = 0;
@@ -183,11 +192,6 @@ static int join_init(AVFilterContext *ctx, const char *args)
JoinContext *s = ctx->priv;
int ret, i;
- s->class = &join_class;
- av_opt_set_defaults(s);
- if ((ret = av_set_options_string(s, args, "=", ":")) < 0)
- return ret;
-
if (!(s->channel_layout = av_get_channel_layout(s->channel_layout_str))) {
av_log(ctx, AV_LOG_ERROR, "Error parsing channel layout '%s'.\n",
s->channel_layout_str);
@@ -513,6 +517,7 @@ AVFilter avfilter_af_join = {
.description = NULL_IF_CONFIG_SMALL("Join multiple audio streams into "
"multi-channel output"),
.priv_size = sizeof(JoinContext),
+ .priv_class = &join_class,
.init = join_init,
.uninit = join_uninit,
@@ -520,5 +525,4 @@ AVFilter avfilter_af_join = {
.inputs = NULL,
.outputs = avfilter_af_join_outputs,
- .priv_class = &join_class,
};
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 2b8b8cda76..44275e9546 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -693,6 +693,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque
!strcmp(filter->filter->name, "hqdn3d" ) ||
!strcmp(filter->filter->name, "idet" ) ||
!strcmp(filter->filter->name, "il" ) ||
+ !strcmp(filter->filter->name, "join" ) ||
!strcmp(filter->filter->name, "kerndeint" ) ||
!strcmp(filter->filter->name, "ocv" ) ||
!strcmp(filter->filter->name, "life" ) ||