summaryrefslogtreecommitdiff
path: root/libavcodec/libspeexdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/libspeexdec.c')
-rw-r--r--libavcodec/libspeexdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/libspeexdec.c b/libavcodec/libspeexdec.c
index daa6dec64a..af0f224b34 100644
--- a/libavcodec/libspeexdec.c
+++ b/libavcodec/libspeexdec.c
@@ -43,7 +43,7 @@ static av_cold int libspeex_decode_init(AVCodecContext *avctx)
LibSpeexContext *s = avctx->priv_data;
const SpeexMode *mode;
SpeexHeader *header = NULL;
- int spx_mode, channels;
+ int spx_mode, channels = avctx->ch_layout.nb_channels;
if (avctx->extradata && avctx->extradata_size >= 80) {
header = speex_packet_to_header(avctx->extradata,