[vlc-commits] Simple channel mixer: refuse 1 channel input

Jean-Baptiste Kempf git at videolan.org
Thu Feb 12 22:44:55 CET 2015


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Feb 12 22:41:18 2015 +0100| [6ad2d7073c91ac92ae6a7d38581204310901983a] | committer: Jean-Baptiste Kempf

Simple channel mixer: refuse 1 channel input

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6ad2d7073c91ac92ae6a7d38581204310901983a
---

 modules/audio_filter/channel_mixer/simple.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/audio_filter/channel_mixer/simple.c b/modules/audio_filter/channel_mixer/simple.c
index 004235a..f296e28 100644
--- a/modules/audio_filter/channel_mixer/simple.c
+++ b/modules/audio_filter/channel_mixer/simple.c
@@ -269,7 +269,8 @@ static int OpenFilter( vlc_object_t *p_this )
 
     if( p_filter->fmt_in.audio.i_format != VLC_CODEC_FL32 ||
         p_filter->fmt_in.audio.i_format != p_filter->fmt_out.audio.i_format ||
-        p_filter->fmt_in.audio.i_rate != p_filter->fmt_out.audio.i_rate )
+        p_filter->fmt_in.audio.i_rate != p_filter->fmt_out.audio.i_rate ||
+        aout_FormatNbChannels( &p_filter->fmt_in.audio) < 2 )
         return VLC_EGENERIC;
 
     uint32_t input = p_filter->fmt_in.audio.i_physical_channels;



More information about the vlc-commits mailing list