[vlc-commits] Rawaud: limit the channels and possible samplerate
Jean-Baptiste Kempf
git at videolan.org
Sun Feb 12 14:32:35 CET 2017
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Feb 12 14:15:19 2017 +0100| [d3d021b43a96da8223b5a87b45ff07f7fc58b834] | committer: Jean-Baptiste Kempf
Rawaud: limit the channels and possible samplerate
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d3d021b43a96da8223b5a87b45ff07f7fc58b834
---
modules/demux/rawaud.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/demux/rawaud.c b/modules/demux/rawaud.c
index ef003fa..527429f 100644
--- a/modules/demux/rawaud.c
+++ b/modules/demux/rawaud.c
@@ -164,7 +164,7 @@ static int Open( vlc_object_t * p_this )
p_sys->fmt.audio.i_channels = var_CreateGetInteger( p_demux, "rawaud-channels" );
p_sys->fmt.audio.i_rate = var_CreateGetInteger( p_demux, "rawaud-samplerate" );
- if( p_sys->fmt.audio.i_rate <= 0 )
+ if( p_sys->fmt.audio.i_rate <= 0 || p_sys->fmt.audio.i_rate > 384000 )
{
msg_Err( p_demux, "invalid sample rate");
es_format_Clean( &p_sys->fmt );
@@ -172,7 +172,7 @@ static int Open( vlc_object_t * p_this )
return VLC_EGENERIC;
}
- if( p_sys->fmt.audio.i_channels <= 0 )
+ if( p_sys->fmt.audio.i_channels <= 0 || p_sys->fmt.audio.i_channels > 32 )
{
msg_Err( p_demux, "invalid number of channels");
es_format_Clean( &p_sys->fmt );
More information about the vlc-commits
mailing list