aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/af_channelmap.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-17 15:13:07 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-04-17 15:13:14 +0200
commitf60ba6c52418a42c5a59a6b9d1e8c13b41c961e3 (patch)
tree04206884ea25529269bad989de7c5fdf7268733e /libavfilter/af_channelmap.c
parent74e86d3147cc0c0af89b5c512fe94e19873a35a1 (diff)
parentc0771a1ac6da697f86e3b10c8fe5dbc2ee92e347 (diff)
downloadffmpeg-f60ba6c52418a42c5a59a6b9d1e8c13b41c961e3.tar.gz
Merge commit 'c0771a1ac6da697f86e3b10c8fe5dbc2ee92e347'
* commit 'c0771a1ac6da697f86e3b10c8fe5dbc2ee92e347': af_channelmap: cosmetics, use an extra local variable to shorten the code Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/af_channelmap.c')
-rw-r--r--libavfilter/af_channelmap.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c
index 2db554eed9..c6ba347236 100644
--- a/libavfilter/af_channelmap.c
+++ b/libavfilter/af_channelmap.c
@@ -363,24 +363,25 @@ static int channelmap_config_input(AVFilterLink *inlink)
char layout_name[256];
for (i = 0; i < s->nch; i++) {
+ struct ChannelMap *m = &s->map[i];
+
if (s->mode == MAP_PAIR_STR_INT || s->mode == MAP_PAIR_STR_STR) {
- s->map[i].in_channel_idx = av_get_channel_layout_channel_index(
- inlink->channel_layout, s->map[i].in_channel);
+ m->in_channel_idx = av_get_channel_layout_channel_index(
+ inlink->channel_layout, m->in_channel);
}
- if (s->map[i].in_channel_idx < 0 ||
- s->map[i].in_channel_idx >= nb_channels) {
+ if (m->in_channel_idx < 0 || m->in_channel_idx >= nb_channels) {
av_get_channel_layout_string(layout_name, sizeof(layout_name),
0, inlink->channel_layout);
- if (s->map[i].in_channel) {
- channel_name = av_get_channel_name(s->map[i].in_channel);
+ if (m->in_channel) {
+ channel_name = av_get_channel_name(m->in_channel);
av_log(ctx, AV_LOG_ERROR,
"input channel '%s' not available from input layout '%s'\n",
channel_name, layout_name);
} else {
av_log(ctx, AV_LOG_ERROR,
"input channel #%d not available from input layout '%s'\n",
- s->map[i].in_channel_idx, layout_name);
+ m->in_channel_idx, layout_name);
}
err = AVERROR(EINVAL);
}