Commit f3d138ab authored by Michael Niedermayer's avatar Michael Niedermayer

avdevice/lavfi: fix input with unknown channel layout

Fixes handling of >8 channels
Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 673d4e82
...@@ -286,7 +286,7 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx) ...@@ -286,7 +286,7 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
30); 30);
} else if (link->type == AVMEDIA_TYPE_AUDIO) { } else if (link->type == AVMEDIA_TYPE_AUDIO) {
st->codec->codec_id = av_get_pcm_codec(link->format, -1); st->codec->codec_id = av_get_pcm_codec(link->format, -1);
st->codec->channels = av_get_channel_layout_nb_channels(link->channel_layout); st->codec->channels = avfilter_link_get_channels(link);
st->codec->sample_fmt = link->format; st->codec->sample_fmt = link->format;
st->codec->sample_rate = link->sample_rate; st->codec->sample_rate = link->sample_rate;
st->codec->time_base = link->time_base; st->codec->time_base = link->time_base;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment