Commit bce67df3 authored by Thomas Guillem's avatar Thomas Guillem

aout: accept unknown channels for passthrough

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

Aouts don't use channels anymore when configuring passthrough.

(cherry picked from commit 2b07680a)
(cherry picked from commit 15468745)
Signed-off-by: Thomas Guillem's avatarThomas Guillem <thomas@gllm.fr>
parent 5b313a75
......@@ -45,15 +45,17 @@ 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 )
......
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