[vlc-commits] aout_DecNew: remove redumdant check

Rémi Denis-Courmont git at videolan.org
Sat Apr 21 18:23:50 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Apr 21 18:53:43 2012 +0300| [974fb44871c45bfdc3a31d54d4d92bf547d866a4] | committer: Rémi Denis-Courmont

aout_DecNew: remove redumdant check

i_channels is checked against i_physical_channels. This is enough to
enforce a reasonably small channels count.

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

 src/audio_output/dec.c |   11 -----------
 1 files changed, 0 insertions(+), 11 deletions(-)

diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index 20b5f84..2ca2324 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -51,17 +51,6 @@ int aout_DecNew( audio_output_t *p_aout,
                  const aout_request_vout_t *p_request_vout )
 {
     /* Sanitize audio format */
-    if( p_format->i_channels > AOUT_CHAN_MAX )
-    {
-        msg_Err( p_aout, "too many audio channels (%u)",
-                 p_format->i_channels );
-        return -1;
-    }
-    if( p_format->i_channels <= 0 )
-    {
-        msg_Err( p_aout, "no audio channels" );
-        return -1;
-    }
     if( p_format->i_channels != aout_FormatNbChannels( p_format ) )
     {
         msg_Err( p_aout, "incompatible audio channels count with layout mask" );



More information about the vlc-commits mailing list