Commit 029138a0 authored by Laurent Aimar's avatar Laurent Aimar

Validated the audio layout and channels compatibility in aout_DecNew.

It will avoid memory corruptions in case of a broken decoder.
parent d2f4a3f8
......@@ -61,6 +61,11 @@ static aout_input_t * DecNew( aout_instance_t * p_aout,
msg_Err( p_aout, "no audio channels" );
return NULL;
}
if( p_format->i_channels != aout_FormatNbChannels( p_format ) )
{
msg_Err( p_aout, "incompatible audio channels count with layout mask" );
return NULL;
}
if( p_format->i_rate > 192000 )
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment