[vlc-commits] codec: faad: set default rate to source's (fix #14213)
Francois Cartegnie
git at videolan.org
Tue Apr 7 21:18:48 CEST 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Apr 7 21:13:02 2015 +0200| [06682f220832758726789cb735bfb89f80cabe56] | committer: Francois 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
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=06682f220832758726789cb735bfb89f80cabe56
---
modules/codec/faad.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/codec/faad.c b/modules/codec/faad.c
index a51861e..99a9bbd 100644
--- a/modules/codec/faad.c
+++ b/modules/codec/faad.c
@@ -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 );
More information about the vlc-commits
mailing list