diff options
author | Benjamin Larsson <banan@ludd.ltu.se> | 2008-11-16 09:54:09 +0000 |
---|---|---|
committer | Benjamin Larsson <banan@ludd.ltu.se> | 2008-11-16 09:54:09 +0000 |
commit | 31d5113a15ddbba386b3f78c068332ff601c290b (patch) | |
tree | 536b6b8659781b274a6babd87f0dd6ad24a43115 /libavcodec | |
parent | 55374d57e88ae9c74840732a7eb055b512e94966 (diff) | |
download | ffmpeg-31d5113a15ddbba386b3f78c068332ff601c290b.tar.gz |
Set channel_layout
Originally committed as revision 15843 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/cook.c | 1 | ||||
-rw-r--r-- | libavcodec/imc.c | 1 | ||||
-rw-r--r-- | libavcodec/nellymoserdec.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/cook.c b/libavcodec/cook.c index ba9f30facd..1affe03e7c 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -1177,6 +1177,7 @@ static int cook_decode_init(AVCodecContext *avctx) } avctx->sample_fmt = SAMPLE_FMT_S16; + avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO; #ifdef COOKDEBUG dump_cook_context(q); diff --git a/libavcodec/imc.c b/libavcodec/imc.c index 436a5c9552..e896eed1b9 100644 --- a/libavcodec/imc.c +++ b/libavcodec/imc.c @@ -155,6 +155,7 @@ static av_cold int imc_decode_init(AVCodecContext * avctx) ff_fft_init(&q->fft, 7, 1); dsputil_init(&q->dsp, avctx); avctx->sample_fmt = SAMPLE_FMT_S16; + avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO; return 0; } diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c index f2a413e49a..dfbb41caf4 100644 --- a/libavcodec/nellymoserdec.c +++ b/libavcodec/nellymoserdec.c @@ -148,6 +148,7 @@ static av_cold int decode_init(AVCodecContext * avctx) { ff_sine_window_init(sine_window, 128); avctx->sample_fmt = SAMPLE_FMT_S16; + avctx->channel_layout = CH_LAYOUT_MONO; return 0; } |