audio output must be reset if the format or channels mask changes

The check would only reset the output if the sample rate or the
bandwidth changed. For example a switch from 16-bits stereo to
32-bits mono would be undetected. Fortunately, this probably never
happened in practice.
This commit is contained in:
Rémi Denis-Courmont 2012-03-06 22:02:42 +02:00
parent c8961f3a00
commit 3e98c8e266

View File

@ -2191,12 +2191,8 @@ static aout_buffer_t *aout_new_buffer( decoder_t *p_dec, int i_samples )
decoder_owner_sys_t *p_owner = p_dec->p_owner;
aout_buffer_t *p_buffer;
if( p_owner->p_aout &&
( p_dec->fmt_out.audio.i_rate != p_owner->audio.i_rate ||
p_dec->fmt_out.audio.i_original_channels !=
p_owner->audio.i_original_channels ||
p_dec->fmt_out.audio.i_bytes_per_frame !=
p_owner->audio.i_bytes_per_frame ) )
if( p_owner->p_aout
&& !AOUT_FMTS_IDENTICAL(&p_dec->fmt_out.audio, &p_owner->audio) )
{
audio_output_t *p_aout = p_owner->p_aout;