[vlc-devel] [PATCH 6/8] codec: keep the input channel_type (incomplete commit)

Adrien Maglo magsoft at videolan.org
Fri Feb 24 16:15:00 CET 2017


---
 modules/codec/araw.c          | 1 +
 modules/codec/avcodec/audio.c | 1 +
 modules/codec/faad.c          | 1 +
 3 files changed, 3 insertions(+)

diff --git a/modules/codec/araw.c b/modules/codec/araw.c
index 6430e26..fcfc1c9 100644
--- a/modules/codec/araw.c
+++ b/modules/codec/araw.c
@@ -270,6 +270,7 @@ static int DecoderOpen( vlc_object_t *p_this )
     /* Set output properties */
     p_dec->fmt_out.i_cat = AUDIO_ES;
     p_dec->fmt_out.i_codec = format;
+    p_dec->fmt_out.audio.channel_type = p_dec->fmt_in.audio.channel_type;
     p_dec->fmt_out.audio.i_format = format;
     p_dec->fmt_out.audio.i_rate = p_dec->fmt_in.audio.i_rate;
     if( p_dec->fmt_in.audio.i_physical_channels )
diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
index 92fbc8e..db22b81 100644
--- a/modules/codec/avcodec/audio.c
+++ b/modules/codec/avcodec/audio.c
@@ -575,6 +575,7 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust )
     decoder_sys_t *p_sys = p_dec->p_sys;
 
     p_dec->fmt_out.i_codec = GetVlcAudioFormat( p_sys->p_context->sample_fmt );
+    p_dec->fmt_out.audio.channel_type = p_dec->fmt_in.audio.channel_type;
     p_dec->fmt_out.audio.i_format = p_dec->fmt_out.i_codec;
     p_dec->fmt_out.audio.i_rate = p_sys->p_context->sample_rate;
 
diff --git a/modules/codec/faad.c b/modules/codec/faad.c
index adb5069..5f03874 100644
--- a/modules/codec/faad.c
+++ b/modules/codec/faad.c
@@ -146,6 +146,7 @@ static int Open( vlc_object_t *p_this )
     p_dec->fmt_out.i_cat = AUDIO_ES;
 
     p_dec->fmt_out.i_codec = HAVE_FPU ? VLC_CODEC_FL32 : VLC_CODEC_S16N;
+    p_dec->fmt_out.audio.channel_type = p_dec->fmt_in.audio.channel_type;
 
     p_dec->fmt_out.audio.i_physical_channels =
         p_dec->fmt_out.audio.i_original_channels = 0;
-- 
2.9.3



More information about the vlc-devel mailing list