Commit 2b07680a authored by Thomas Guillem's avatar Thomas Guillem

aout: accept unknown channels/rate for passthrough

Fix audio passthrough playback when our demux/packetizer can't parse hd audio
codecs informations.

Aouts don't use channels/rate anymore when configuring passthrough.
parent 5ff52a41
......@@ -45,28 +45,30 @@ int aout_DecNew( audio_output_t *p_aout,
const audio_replay_gain_t *p_replay_gain,
const aout_request_vout_t *p_request_vout )
{
/* Sanitize audio format, input need to have a valid physical channels
* layout or a valid number of channels. */
int i_map_channels = aout_FormatNbChannels( p_format );
if( ( i_map_channels == 0 && p_format->i_channels == 0 )
|| i_map_channels > AOUT_CHAN_MAX || p_format->i_channels > INPUT_CHAN_MAX )
if( p_format->i_bitspersample > 0 )
{
msg_Err( p_aout, "invalid audio channels count" );
return -1;
}
/* Sanitize audio format, input need to have a valid physical channels
* layout or a valid number of channels. */
int i_map_channels = aout_FormatNbChannels( p_format );
if( ( i_map_channels == 0 && p_format->i_channels == 0 )
|| i_map_channels > AOUT_CHAN_MAX || p_format->i_channels > INPUT_CHAN_MAX )
{
msg_Err( p_aout, "invalid audio channels count" );
return -1;
}
if( p_format->i_rate > 352800 )
{
msg_Err( p_aout, "excessive audio sample frequency (%u)",
p_format->i_rate );
return -1;
}
if( p_format->i_rate < 4000 )
{
msg_Err( p_aout, "too low audio sample frequency (%u)",
p_format->i_rate );
return -1;
if( p_format->i_rate > 352800 )
{
msg_Err( p_aout, "excessive audio sample frequency (%u)",
p_format->i_rate );
return -1;
}
if( p_format->i_rate < 4000 )
{
msg_Err( p_aout, "too low audio sample frequency (%u)",
p_format->i_rate );
return -1;
}
}
aout_owner_t *owner = aout_owner(p_aout);
......
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