[FFmpeg-cvslog] libspeexdec: set channel_layout

Justin Ruggles git at videolan.org
Thu Oct 4 13:18:02 CEST 2012


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Sun Sep 30 22:14:10 2012 -0400| [27c3f9c03e1d0290dfd6e185b75acdf463bdb7b2] | committer: Justin Ruggles

libspeexdec: set channel_layout

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=27c3f9c03e1d0290dfd6e185b75acdf463bdb7b2
---

 libavcodec/libspeexdec.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavcodec/libspeexdec.c b/libavcodec/libspeexdec.c
index b9d9149..21c9d05 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);



More information about the ffmpeg-cvslog mailing list