[vlc-commits] soxr: fix output len calculation

Thomas Guillem git at videolan.org
Thu Feb 28 14:32:08 CET 2019


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Feb 25 15:35:45 2019 +0100| [2b3b92cdf2101ff1458f26446528d4621f6b7839] | committer: Thomas Guillem

soxr: fix output len calculation

When the rate ratio is variable

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2b3b92cdf2101ff1458f26446528d4621f6b7839
---

 modules/audio_filter/resampler/soxr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/audio_filter/resampler/soxr.c b/modules/audio_filter/resampler/soxr.c
index 7babe2aaee..7d7e31fd91 100644
--- a/modules/audio_filter/resampler/soxr.c
+++ b/modules/audio_filter/resampler/soxr.c
@@ -302,7 +302,7 @@ 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 );
+        const size_t i_olen = SoXR_GetOutLen( p_in->i_nb_samples, 1.0f );
 
         if( f_ratio != p_sys->f_fixed_ratio )
         {



More information about the vlc-commits mailing list