changeset 8153:ef9f95604644 libavcodec

Set channel_layout
author banan
date Sun, 16 Nov 2008 09:54:09 +0000
parents cddc3677e7dc
children 6d2beae655f0
files cook.c imc.c nellymoserdec.c
diffstat 3 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/cook.c	Sun Nov 16 06:47:44 2008 +0000
+++ b/cook.c	Sun Nov 16 09:54:09 2008 +0000
@@ -1177,6 +1177,7 @@
     }
 
     avctx->sample_fmt = SAMPLE_FMT_S16;
+    avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
 
 #ifdef COOKDEBUG
     dump_cook_context(q);
--- a/imc.c	Sun Nov 16 06:47:44 2008 +0000
+++ b/imc.c	Sun Nov 16 09:54:09 2008 +0000
@@ -155,6 +155,7 @@
     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;
 }
 
--- a/nellymoserdec.c	Sun Nov 16 06:47:44 2008 +0000
+++ b/nellymoserdec.c	Sun Nov 16 09:54:09 2008 +0000
@@ -148,6 +148,7 @@
         ff_sine_window_init(sine_window, 128);
 
     avctx->sample_fmt = SAMPLE_FMT_S16;
+    avctx->channel_layout = CH_LAYOUT_MONO;
     return 0;
 }