[vlc-devel] commit: Fixed selection of simple mixer (close #1688) (Laurent Aimar )
git version control
git at videolan.org
Wed Jul 9 22:40:24 CEST 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed Jul 9 20:40:05 2008 +0000| [dc8472ea2c11bc4d6c1cbba670a4d2dde595401e]
Fixed selection of simple mixer (close #1688)
This mixer can only downsample.
Let trivial mixer handles
Dual-Mono -> Stereo|Stereo-left|Stereo-right|Stereo-reverse.
(Please double check on your multiple channels sources)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dc8472ea2c11bc4d6c1cbba670a4d2dde595401e
---
modules/audio_filter/channel_mixer/simple.c | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/modules/audio_filter/channel_mixer/simple.c b/modules/audio_filter/channel_mixer/simple.c
index ba6580d..f95ce67 100644
--- a/modules/audio_filter/channel_mixer/simple.c
+++ b/modules/audio_filter/channel_mixer/simple.c
@@ -282,13 +282,13 @@ static block_t *Filter( filter_t *p_filter, block_t *p_block )
*****************************************************************************/
static bool IsSupported( const audio_format_t *p_input, const audio_format_t *p_output )
{
- if ( (p_input->i_physical_channels
- == p_output->i_physical_channels
- && p_input->i_original_channels
- == p_output->i_original_channels)
- || p_input->i_format != p_output->i_format
- || p_input->i_rate != p_output->i_rate
- || p_input->i_format != VLC_FOURCC('f','l','3','2') )
+ if( p_input->i_format != VLC_FOURCC('f','l','3','2') ||
+ p_input->i_format != p_output->i_format ||
+ p_input->i_rate != p_output->i_rate )
+ return false;
+
+ if( p_input->i_physical_channels == p_output->i_physical_channels &&
+ p_input->i_original_channels == p_output->i_original_channels )
{
return false;
}
@@ -308,5 +308,11 @@ static bool IsSupported( const audio_format_t *p_input, const audio_format_t *p_
{
return false;
}
+
+ /* Only if we downmix */
+ if( aout_FormatNbChannels( p_input ) <= aout_FormatNbChannels( p_output ) )
+ return false;
+
return true;
}
+
More information about the vlc-devel
mailing list