Browse code

sipr: set channel layout

Justin Ruggles authored on 2012/10/23 13:51:26
Showing 1 changed files
... ...
@@ -25,6 +25,7 @@
25 25
 #include <stdint.h>
26 26
 #include <string.h>
27 27
 
28
+#include "libavutil/audioconvert.h"
28 29
 #include "libavutil/mathematics.h"
29 30
 #include "avcodec.h"
30 31
 #define BITSTREAM_READER_LE
... ...
@@ -509,7 +510,9 @@ static av_cold int sipr_decoder_init(AVCodecContext * avctx)
509 509
     for (i = 0; i < 4; i++)
510 510
         ctx->energy_history[i] = -14;
511 511
 
512
-    avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
512
+    avctx->channels       = 1;
513
+    avctx->channel_layout = AV_CH_LAYOUT_MONO;
514
+    avctx->sample_fmt     = AV_SAMPLE_FMT_FLT;
513 515
 
514 516
     avcodec_get_frame_defaults(&ctx->frame);
515 517
     avctx->coded_frame = &ctx->frame;