Commit a917dca7 authored by François Cartegnie's avatar François Cartegnie 🤞
Browse files

input: decoder: compare audio codec in aout_update_format

Source of undersized buffers on format change.

Since audio format is derived from fmt.i_codec, the update
path is inconsistent, not updating the aout format in case
fmt.i_codec changes (only comparing the derived audio.i_format)
parent 9a506a0a
......@@ -288,8 +288,9 @@ static int aout_update_format( decoder_t *p_dec )
decoder_owner_sys_t *p_owner = p_dec->p_owner;
if( p_owner->p_aout
&& !AOUT_FMTS_IDENTICAL(&p_dec->, &p_owner-> )
if( p_owner->p_aout &&
( !AOUT_FMTS_IDENTICAL(&p_dec->, &p_owner-> ||
p_dec->fmt_out.i_codec != p_owner->fmt.i_codec ) )
audio_output_t *p_aout = p_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