[vlc-commits] codec: vorbix: max channels is 8

Francois Cartegnie git at videolan.org
Wed Mar 12 18:48:18 CET 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Mar 12 18:25:40 2014 +0100| [8c2e47c08a41acaf7bf4e4b6996c12bb1774a867] | committer: Francois Cartegnie

codec: vorbix: max channels is 8

fix cid #1048883

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

 modules/codec/vorbis.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/codec/vorbis.c b/modules/codec/vorbis.c
index 0741029..4d0b57c 100644
--- a/modules/codec/vorbis.c
+++ b/modules/codec/vorbis.c
@@ -362,9 +362,10 @@ static int ProcessHeaders( decoder_t *p_dec )
     p_dec->fmt_out.audio.i_rate     = p_sys->vi.rate;
     p_dec->fmt_out.audio.i_channels = p_sys->vi.channels;
 
-    if( p_dec->fmt_out.audio.i_channels > 9 )
+    if( p_dec->fmt_out.audio.i_channels > ARRAY_SIZE(pi_channels_maps) )
     {
-        msg_Err( p_dec, "invalid number of channels (not between 1 and 9): %i",
+        msg_Err( p_dec, "invalid number of channels (not between 1 and %lu): %i",
+                 ARRAY_SIZE(pi_channels_maps),
                  p_dec->fmt_out.audio.i_channels );
         return VLC_EGENERIC;
     }



More information about the vlc-commits mailing list