summaryrefslogtreecommitdiff
path: root/libavdevice/alsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavdevice/alsa.c')
-rw-r--r--libavdevice/alsa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavdevice/alsa.c b/libavdevice/alsa.c
index 6d68267602..d394e4377d 100644
--- a/libavdevice/alsa.c
+++ b/libavdevice/alsa.c
@@ -194,7 +194,7 @@ av_cold int ff_alsa_open(AVFormatContext *ctx, snd_pcm_stream_t mode,
snd_pcm_t *h;
snd_pcm_hw_params_t *hw_params;
snd_pcm_uframes_t buffer_size, period_size;
- uint64_t layout = ctx->streams[0]->codec->channel_layout;
+ uint64_t layout = ctx->streams[0]->codecpar->channel_layout;
if (ctx->filename[0] == 0) audio_device = "default";
else audio_device = ctx->filename;