summaryrefslogtreecommitdiff
path: root/libavdevice/alsa_enc.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2021-08-27 14:30:45 -0300
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:30 -0300
commitffc4fd3cc2ccb2cadb71f19849842b18ca1281c6 (patch)
treebb2ed0afa829d44db52b93d1fe3316de6bcacdd8 /libavdevice/alsa_enc.c
parent00c5526fc8bbfcd210f685c49bcd345fa2160b60 (diff)
downloadffmpeg-ffc4fd3cc2ccb2cadb71f19849842b18ca1281c6.tar.gz
alsa: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavdevice/alsa_enc.c')
-rw-r--r--libavdevice/alsa_enc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavdevice/alsa_enc.c b/libavdevice/alsa_enc.c
index a783d8eca1..fc5e5d9c94 100644
--- a/libavdevice/alsa_enc.c
+++ b/libavdevice/alsa_enc.c
@@ -64,7 +64,7 @@ static av_cold int audio_write_header(AVFormatContext *s1)
sample_rate = st->codecpar->sample_rate;
codec_id = st->codecpar->codec_id;
res = ff_alsa_open(s1, SND_PCM_STREAM_PLAYBACK, &sample_rate,
- st->codecpar->channels, &codec_id);
+ st->codecpar->ch_layout.nb_channels, &codec_id);
if (sample_rate != st->codecpar->sample_rate) {
av_log(s1, AV_LOG_ERROR,
"sample rate %d not available, nearest is %d\n",