projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29abb04
)
libspeexdec: set channel_layout
author
Justin Ruggles
<justin.ruggles@gmail.com>
Mon, 1 Oct 2012 02:14:10 +0000
(22:14 -0400)
committer
Justin Ruggles
<justin.ruggles@gmail.com>
Wed, 3 Oct 2012 20:03:32 +0000
(16:03 -0400)
libavcodec/libspeexdec.c
patch
|
blob
|
history
diff --git
a/libavcodec/libspeexdec.c
b/libavcodec/libspeexdec.c
index
b9d9149
..
21c9d05
100644
(file)
--- 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);