summaryrefslogtreecommitdiff
path: root/libavcodec/libspeexdec.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-09-30 22:14:10 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2012-10-03 16:03:32 -0400
commit27c3f9c03e1d0290dfd6e185b75acdf463bdb7b2 (patch)
treeed7b935dea072a0467db23935e0c38c3ae7b9a80 /libavcodec/libspeexdec.c
parent29abb04e73b0580ebe38703cadb988d26df6a76a (diff)
libspeexdec: set channel_layout
Diffstat (limited to 'libavcodec/libspeexdec.c')
-rw-r--r--libavcodec/libspeexdec.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/libspeexdec.c b/libavcodec/libspeexdec.c
index b9d9149ee2..21c9d05428 100644
--- a/libavcodec/libspeexdec.c
+++ b/libavcodec/libspeexdec.c
@@ -22,8 +22,10 @@
#include <speex/speex_header.h>
#include <speex/speex_stereo.h>
#include <speex/speex_callbacks.h>
-#include "avcodec.h"
+
+#include "libavutil/audioconvert.h"
#include "libavutil/common.h"
+#include "avcodec.h"
typedef struct {
AVFrame frame;
@@ -76,6 +78,8 @@ static av_cold int libspeex_decode_init(AVCodecContext *avctx)
"Decoding as stereo.\n", avctx->channels);
avctx->channels = 2;
}
+ avctx->channel_layout = avctx->channels == 2 ? AV_CH_LAYOUT_STEREO :
+ AV_CH_LAYOUT_MONO;
speex_bits_init(&s->bits);
s->dec_state = speex_decoder_init(mode);