summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-01 10:11:01 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-01 10:11:01 +0200
commita1b88797144111262b07cde42b038387a3c6578b (patch)
tree3f8094e150245f08e0464da9ab582b979b1ba80f
parent52fa2945b594d02c84b817aaa3d01041eb2c1cf7 (diff)
parent949c603ed9210df0e1b8e1aa82c71b93543d8071 (diff)
Merge commit '949c603ed9210df0e1b8e1aa82c71b93543d8071'
* commit '949c603ed9210df0e1b8e1aa82c71b93543d8071': af_channelmap: remove now unnecessary goto vf_split: fix description Conflicts: libavfilter/split.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavfilter/af_channelmap.c35
-rw-r--r--libavfilter/split.c2
2 files changed, 12 insertions, 25 deletions
diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c
index c6ba347236..810615fedc 100644
--- a/libavfilter/af_channelmap.c
+++ b/libavfilter/af_channelmap.c
@@ -123,7 +123,6 @@ static int get_channel(char **map, uint64_t *ch, char delim)
static av_cold int channelmap_init(AVFilterContext *ctx)
{
ChannelMapContext *s = ctx->priv;
- int ret = 0;
char *mapping, separator = '|';
int map_entries = 0;
char buf[256];
@@ -173,8 +172,7 @@ static av_cold int channelmap_init(AVFilterContext *ctx)
if (map_entries > MAX_CH) {
av_log(ctx, AV_LOG_ERROR, "Too many channels mapped: '%d'.\n", map_entries);
- ret = AVERROR(EINVAL);
- goto fail;
+ return AVERROR(EINVAL);
}
for (i = 0; i < map_entries; i++) {
@@ -184,9 +182,8 @@ static av_cold int channelmap_init(AVFilterContext *ctx)
switch (mode) {
case MAP_ONE_INT:
if (get_channel_idx(&mapping, &in_ch_idx, separator, MAX_CH) < 0) {
- ret = AVERROR(EINVAL);
av_log(ctx, AV_LOG_ERROR, err);
- goto fail;
+ return AVERROR(EINVAL);
}
s->map[i].in_channel_idx = in_ch_idx;
s->map[i].out_channel_idx = i;
@@ -194,8 +191,7 @@ static av_cold int channelmap_init(AVFilterContext *ctx)
case MAP_ONE_STR:
if (!get_channel(&mapping, &in_ch, separator)) {
av_log(ctx, AV_LOG_ERROR, err);
- ret = AVERROR(EINVAL);
- goto fail;
+ return AVERROR(EINVAL);
}
s->map[i].in_channel = in_ch;
s->map[i].out_channel_idx = i;
@@ -204,8 +200,7 @@ static av_cold int channelmap_init(AVFilterContext *ctx)
if (get_channel_idx(&mapping, &in_ch_idx, '-', MAX_CH) < 0 ||
get_channel_idx(&mapping, &out_ch_idx, separator, MAX_CH) < 0) {
av_log(ctx, AV_LOG_ERROR, err);
- ret = AVERROR(EINVAL);
- goto fail;
+ return AVERROR(EINVAL);
}
s->map[i].in_channel_idx = in_ch_idx;
s->map[i].out_channel_idx = out_ch_idx;
@@ -215,8 +210,7 @@ static av_cold int channelmap_init(AVFilterContext *ctx)
get_channel(&mapping, &out_ch, separator) < 0 ||
out_ch & out_ch_mask) {
av_log(ctx, AV_LOG_ERROR, err);
- ret = AVERROR(EINVAL);
- goto fail;
+ return AVERROR(EINVAL);
}
s->map[i].in_channel_idx = in_ch_idx;
s->map[i].out_channel = out_ch;
@@ -226,8 +220,7 @@ static av_cold int channelmap_init(AVFilterContext *ctx)
if (get_channel(&mapping, &in_ch, '-') < 0 ||
get_channel_idx(&mapping, &out_ch_idx, separator, MAX_CH) < 0) {
av_log(ctx, AV_LOG_ERROR, err);
- ret = AVERROR(EINVAL);
- goto fail;
+ return AVERROR(EINVAL);
}
s->map[i].in_channel = in_ch;
s->map[i].out_channel_idx = out_ch_idx;
@@ -237,8 +230,7 @@ static av_cold int channelmap_init(AVFilterContext *ctx)
get_channel(&mapping, &out_ch, separator) < 0 ||
out_ch & out_ch_mask) {
av_log(ctx, AV_LOG_ERROR, err);
- ret = AVERROR(EINVAL);
- goto fail;
+ return AVERROR(EINVAL);
}
s->map[i].in_channel = in_ch;
s->map[i].out_channel = out_ch;
@@ -256,8 +248,7 @@ static av_cold int channelmap_init(AVFilterContext *ctx)
if ((fmt = av_get_channel_layout(s->channel_layout_str)) == 0) {
av_log(ctx, AV_LOG_ERROR, "Error parsing channel layout: '%s'.\n",
s->channel_layout_str);
- ret = AVERROR(EINVAL);
- goto fail;
+ return AVERROR(EINVAL);
}
if (mode == MAP_NONE) {
int i;
@@ -271,14 +262,12 @@ static av_cold int channelmap_init(AVFilterContext *ctx)
av_log(ctx, AV_LOG_ERROR,
"Output channel layout '%s' does not match the list of channel mapped: '%s'.\n",
s->channel_layout_str, buf);
- ret = AVERROR(EINVAL);
- goto fail;
+ return AVERROR(EINVAL);
} else if (s->nch != av_get_channel_layout_nb_channels(fmt)) {
av_log(ctx, AV_LOG_ERROR,
"Output channel layout %s does not match the number of channels mapped %d.\n",
s->channel_layout_str, s->nch);
- ret = AVERROR(EINVAL);
- goto fail;
+ return AVERROR(EINVAL);
}
s->output_layout = fmt;
}
@@ -291,9 +280,7 @@ static av_cold int channelmap_init(AVFilterContext *ctx)
}
}
-fail:
- av_opt_free(s);
- return ret;
+ return 0;
}
static int channelmap_query_formats(AVFilterContext *ctx)
diff --git a/libavfilter/split.c b/libavfilter/split.c
index 251ea2e4a3..3e6a60f0dc 100644
--- a/libavfilter/split.c
+++ b/libavfilter/split.c
@@ -115,7 +115,7 @@ static const AVFilterPad avfilter_vf_split_inputs[] = {
AVFilter avfilter_vf_split = {
.name = "split",
- .description = NULL_IF_CONFIG_SMALL("Pass on the input video to N outputs."),
+ .description = NULL_IF_CONFIG_SMALL("Pass on the input to N video outputs."),
.priv_size = sizeof(SplitContext),
.priv_class = &split_class,