[FFmpeg-cvslog] libilbc: 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 17:41:47 2012 -0400| [30f8da29bf609d741bbebd33b2a5003c426ab919] | committer: Justin Ruggles

libilbc: set channel layout

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

 libavcodec/libilbc.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/libavcodec/libilbc.c b/libavcodec/libilbc.c
index a93285c..2812061 100644
--- a/libavcodec/libilbc.c
+++ b/libavcodec/libilbc.c
@@ -21,6 +21,7 @@
 
 #include <ilbc.h>
 
+#include "libavutil/audioconvert.h"
 #include "avcodec.h"
 #include "libavutil/common.h"
 #include "libavutil/opt.h"
@@ -68,9 +69,10 @@ static av_cold int ilbc_decode_init(AVCodecContext *avctx)
     avcodec_get_frame_defaults(&s->frame);
     avctx->coded_frame = &s->frame;
 
-    avctx->channels = 1;
-    avctx->sample_rate = 8000;
-    avctx->sample_fmt = AV_SAMPLE_FMT_S16;
+    avctx->channels       = 1;
+    avctx->channel_layout = AV_CH_LAYOUT_MONO;
+    avctx->sample_rate    = 8000;
+    avctx->sample_fmt     = AV_SAMPLE_FMT_S16;
 
     return 0;
 }



More information about the ffmpeg-cvslog mailing list