libilbc: set channel layout

This commit is contained in:
Justin Ruggles 2012-10-22 17:41:47 -04:00
parent 0fd1ddf155
commit 30f8da29bf
1 changed files with 5 additions and 3 deletions

View File

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