Commit f20299c2 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Do not apply AOUT_CHAN_PHYSMASK to i_physical_channels

It only makes sense for i_original_channels.
parent af3201fb
......@@ -209,7 +209,7 @@ VLC_API void aout_ChannelExtract( void *p_dst, int i_dst_channels, const void *p
/* */
static inline unsigned aout_FormatNbChannels(const audio_sample_format_t *fmt)
{
return popcount(fmt->i_physical_channels & AOUT_CHAN_PHYSMASK);
return popcount(fmt->i_physical_channels);
}
VLC_API unsigned int aout_BitsPerSample( vlc_fourcc_t i_format ) VLC_USED;
......
......@@ -123,8 +123,7 @@ static int Open( vlc_object_t *p_this, filter_sys_t *p_sys,
/* We'll do our own downmixing, thanks. */
p_sys->i_nb_channels = aout_FormatNbChannels( output );
switch ( (output->i_physical_channels & AOUT_CHAN_PHYSMASK)
& ~AOUT_CHAN_LFE )
switch ( output->i_physical_channels & ~AOUT_CHAN_LFE )
{
case AOUT_CHAN_CENTER:
if ( (output->i_original_channels & AOUT_CHAN_CENTER)
......@@ -214,7 +213,7 @@ static int Open( vlc_object_t *p_this, filter_sys_t *p_sys,
}
aout_CheckChannelReorder( pi_channels_in, NULL,
output->i_physical_channels & AOUT_CHAN_PHYSMASK,
output->i_physical_channels,
p_sys->i_nb_channels,
p_sys->pi_chan_table );
......
......@@ -102,8 +102,7 @@ static int Open( vlc_object_t *p_this, filter_sys_t *p_sys,
/* We'll do our own downmixing, thanks. */
p_sys->i_nb_channels = aout_FormatNbChannels( output );
switch ( (output->i_physical_channels & AOUT_CHAN_PHYSMASK)
& ~AOUT_CHAN_LFE )
switch ( output->i_physical_channels & ~AOUT_CHAN_LFE )
{
case AOUT_CHAN_CENTER:
if ( (output->i_original_channels & AOUT_CHAN_CENTER)
......@@ -176,7 +175,7 @@ static int Open( vlc_object_t *p_this, filter_sys_t *p_sys,
}
aout_CheckChannelReorder( pi_channels_in, NULL,
output->i_physical_channels & AOUT_CHAN_PHYSMASK,
output->i_physical_channels,
p_sys->i_nb_channels,
p_sys->pi_chan_table );
......
......@@ -660,12 +660,12 @@ static void ConfigureChannelOrder(int *pi_chan_table, int i_channels, uint32_t i
if( b_decode )
aout_CheckChannelReorder( pi_channels_in, NULL,
i_channel_mask & AOUT_CHAN_PHYSMASK,
i_channel_mask,
i_channels,
pi_chan_table );
else
aout_CheckChannelReorder( NULL, pi_channels_in,
i_channel_mask & AOUT_CHAN_PHYSMASK,
i_channel_mask,
i_channels,
pi_chan_table );
}
......
......@@ -300,7 +300,7 @@ void aout_FormatPrepare( audio_sample_format_t * p_format )
*****************************************************************************/
const char * aout_FormatPrintChannels( const audio_sample_format_t * p_format )
{
switch ( p_format->i_physical_channels & AOUT_CHAN_PHYSMASK )
switch ( p_format->i_physical_channels )
{
case AOUT_CHAN_LEFT:
case AOUT_CHAN_RIGHT:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment