Browse Source

avfilter/af_pan: check if the number of channels where sucessfully set

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.4
Michael Niedermayer 11 years ago
parent
commit
ced765ceb3
1 changed files with 8 additions and 4 deletions
  1. +8
    -4
      libavfilter/af_pan.c

+ 8
- 4
libavfilter/af_pan.c View File

@@ -286,10 +286,14 @@ static int config_props(AVFilterLink *link)
0, ctx);
if (!pan->swr)
return AVERROR(ENOMEM);
if (!link->channel_layout)
av_opt_set_int(pan->swr, "ich", link->channels, 0);
if (!pan->out_channel_layout)
av_opt_set_int(pan->swr, "och", pan->nb_output_channels, 0);
if (!link->channel_layout) {
if (av_opt_set_int(pan->swr, "ich", link->channels, 0) < 0)
return AVERROR(EINVAL);
}
if (!pan->out_channel_layout) {
if (av_opt_set_int(pan->swr, "och", pan->nb_output_channels, 0) < 0)
return AVERROR(EINVAL);
}

// gains are pure, init the channel mapping
if (pan->pure_gains) {


Loading…
Cancel
Save