[FFmpeg-cvslog] qcelpdec: set channel layout

Justin Ruggles git at videolan.org
Fri Nov 2 14:32:41 CET 2012


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Mon Oct 22 18:25:46 2012 -0400| [e3d6ab57042ef7b35f24bf154fba39369034a665] | committer: Justin Ruggles

qcelpdec: set channel layout

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

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

diff --git a/libavcodec/qcelpdec.c b/libavcodec/qcelpdec.c
index edb1d24..9c2b354 100644
--- a/libavcodec/qcelpdec.c
+++ b/libavcodec/qcelpdec.c
@@ -29,6 +29,7 @@
 
 #include <stddef.h>
 
+#include "libavutil/audioconvert.h"
 #include "avcodec.h"
 #include "internal.h"
 #include "get_bits.h"
@@ -89,7 +90,9 @@ static av_cold int qcelp_decode_init(AVCodecContext *avctx)
     QCELPContext *q = avctx->priv_data;
     int i;
 
-    avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
+    avctx->channels       = 1;
+    avctx->channel_layout = AV_CH_LAYOUT_MONO;
+    avctx->sample_fmt     = AV_SAMPLE_FMT_FLT;
 
     for (i = 0; i < 10; i++)
         q->prev_lspf[i] = (i + 1) / 11.;



More information about the ffmpeg-cvslog mailing list