changeset 8174:f11197441364 libavcodec

Add channel layout to several audio decoders I maintain
author kostya
date Wed, 19 Nov 2008 14:57:48 +0000
parents 471b16105266
children 0d1c9c936a52
files apedec.c mpc7.c mpc8.c smacker.c wavpack.c
diffstat 5 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/apedec.c	Wed Nov 19 01:40:09 2008 +0000
+++ b/apedec.c	Wed Nov 19 14:57:48 2008 +0000
@@ -199,6 +199,7 @@
 
     dsputil_init(&s->dsp, avctx);
     avctx->sample_fmt = SAMPLE_FMT_S16;
+    avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
     return 0;
 }
 
--- a/mpc7.c	Wed Nov 19 01:40:09 2008 +0000
+++ b/mpc7.c	Wed Nov 19 14:57:48 2008 +0000
@@ -109,6 +109,7 @@
     }
     vlc_initialized = 1;
     avctx->sample_fmt = SAMPLE_FMT_S16;
+    avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
     return 0;
 }
 
--- a/mpc8.c	Wed Nov 19 01:40:09 2008 +0000
+++ b/mpc8.c	Wed Nov 19 14:57:48 2008 +0000
@@ -178,6 +178,7 @@
     }
     vlc_initialized = 1;
     avctx->sample_fmt = SAMPLE_FMT_S16;
+    avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
     return 0;
 }
 
--- a/smacker.c	Wed Nov 19 01:40:09 2008 +0000
+++ b/smacker.c	Wed Nov 19 14:57:48 2008 +0000
@@ -559,6 +559,7 @@
 static av_cold int smka_decode_init(AVCodecContext *avctx)
 {
     avctx->sample_fmt = SAMPLE_FMT_S16;
+    avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
     return 0;
 }
 
--- a/wavpack.c	Wed Nov 19 01:40:09 2008 +0000
+++ b/wavpack.c	Wed Nov 19 14:57:48 2008 +0000
@@ -361,6 +361,7 @@
     s->avctx = avctx;
     s->stereo = (avctx->channels == 2);
     avctx->sample_fmt = SAMPLE_FMT_S16;
+    avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
 
     return 0;
 }