qcelpdec: set channel layout
authorJustin Ruggles <justin.ruggles@gmail.com>
Mon, 22 Oct 2012 22:25:46 +0000 (18:25 -0400)
committerJustin Ruggles <justin.ruggles@gmail.com>
Thu, 1 Nov 2012 15:29:18 +0000 (11:29 -0400)
libavcodec/qcelpdec.c

index edb1d24..9c2b354 100644 (file)
@@ -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.;