Commit 06682f22 authored by François Cartegnie's avatar François Cartegnie 🤞

codec: faad: set default rate to source's (fix #14213)

output pts/length is computed from input block pts.
If sample rate is wrong, all timings are borked.
Try to use the declared sample rate if possible.

If source has wrong sample rate
parent 5816897e
......@@ -183,6 +183,8 @@ static int Open( vlc_object_t *p_this )
/* Set the faad config */
cfg = faacDecGetCurrentConfiguration( p_sys->hfaad );
if( p_dec->fmt_in.audio.i_rate )
cfg->defSampleRate = p_dec->fmt_in.audio.i_rate;
cfg->outputFormat = HAVE_FPU ? FAAD_FMT_FLOAT : FAAD_FMT_16BIT;
faacDecSetConfiguration( p_sys->hfaad, cfg );
......
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