mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-23 04:24:35 +02:00
avfilter/af_pan: check if the number of channels where sucessfully set
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
d9e7dc3e16
commit
ced765ceb3
@ -286,10 +286,14 @@ static int config_props(AVFilterLink *link)
|
|||||||
0, ctx);
|
0, ctx);
|
||||||
if (!pan->swr)
|
if (!pan->swr)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
if (!link->channel_layout)
|
if (!link->channel_layout) {
|
||||||
av_opt_set_int(pan->swr, "ich", link->channels, 0);
|
if (av_opt_set_int(pan->swr, "ich", link->channels, 0) < 0)
|
||||||
if (!pan->out_channel_layout)
|
return AVERROR(EINVAL);
|
||||||
av_opt_set_int(pan->swr, "och", pan->nb_output_channels, 0);
|
}
|
||||||
|
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
|
// gains are pure, init the channel mapping
|
||||||
if (pan->pure_gains) {
|
if (pan->pure_gains) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user