Fixed downmixing to mono (close #2728).
authorLaurent Aimar <fenrir@videolan.org>
Wed, 13 May 2009 19:59:13 +0000 (21:59 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Wed, 13 May 2009 19:59:13 +0000 (21:59 +0200)
modules/audio_filter/channel_mixer/simple.c

index 02def5e..443c3cf 100644 (file)
@@ -102,7 +102,8 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
 
     const bool b_input_7_0 = (i_input_physical & ~AOUT_CHAN_LFE) == AOUT_CHANS_7_0;
     const bool b_input_5_0 = !b_input_7_0 &&
-                             (i_input_physical & (AOUT_CHANS_5_0|AOUT_CHANS_5_0_MIDDLE));
+                             ( (i_input_physical & AOUT_CHANS_5_0) == AOUT_CHANS_5_0 ||
+                               (i_input_physical & AOUT_CHANS_5_0_MIDDLE) == AOUT_CHANS_5_0_MIDDLE );
     int i_input_nb = aout_FormatNbChannels( &p_filter->input );
     int i_output_nb = aout_FormatNbChannels( &p_filter->output );
     float *p_dest = (float *)p_out_buf->p_buffer;