[vlc-commits] soxr: fix output len too small
Thomas Guillem
git at videolan.org
Tue May 5 13:51:56 CEST 2020
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon May 4 14:43:12 2020 +0200| [c07e53871ddc6ac75f448d48032c57e86995004d] | committer: Thomas Guillem
soxr: fix output len too small
This was happening when the instant ratio was smaller than the fixed ratio
(when the user ask for a playback speed > 1).
Fixes issue 956 on vlc-android.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c07e53871ddc6ac75f448d48032c57e86995004d
---
modules/audio_filter/resampler/soxr.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/audio_filter/resampler/soxr.c b/modules/audio_filter/resampler/soxr.c
index 81590c827f..1490d30c63 100644
--- a/modules/audio_filter/resampler/soxr.c
+++ b/modules/audio_filter/resampler/soxr.c
@@ -312,7 +312,8 @@ Resample( filter_t *p_filter, block_t *p_in )
block_t *p_flushed_out = NULL, *p_out = NULL;
const double f_ratio = p_filter->fmt_out.audio.i_rate
/ (double) p_filter->fmt_in.audio.i_rate;
- const size_t i_olen = SoXR_GetOutLen( p_in->i_nb_samples, f_ratio );
+ size_t i_olen = SoXR_GetOutLen( p_in->i_nb_samples,
+ f_ratio > p_sys->f_fixed_ratio ? f_ratio : p_sys->f_fixed_ratio );
if( f_ratio != p_sys->f_fixed_ratio )
{
More information about the vlc-commits
mailing list