vlc/vlc-1.2 | branch: master | Rémi Denis-Courmont <[email protected]> | Wed Dec 7 21:23:27 2011 +0200| [4adf0897582a119e56911cb0118eedc2b61d8c49] | committer: Rémi Denis-Courmont
speex resampler: add 10% slack output space This should fix buffer underflows when changing the playback rate. We probably should instead reallocate the buffer and resume resampling when the situation occurs, but that would be a lot more complicated. (cherry picked from commit 86d9aabfe7e62477b6f6bb15a61c47df159c813f) > http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=4adf0897582a119e56911cb0118eedc2b61d8c49 --- modules/audio_filter/resampler/speex.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/modules/audio_filter/resampler/speex.c b/modules/audio_filter/resampler/speex.c index f472b71..561261a 100644 --- a/modules/audio_filter/resampler/speex.c +++ b/modules/audio_filter/resampler/speex.c @@ -111,7 +111,7 @@ static block_t *Resample (filter_t *filter, block_t *in) const unsigned orate = filter->fmt_out.audio.i_rate; spx_uint32_t ilen = in->i_nb_samples; - spx_uint32_t olen = ((ilen + 2) * orate) / irate; + spx_uint32_t olen = ((ilen + 2) * orate * 11) / (irate * 10); block_t *out = block_Alloc (olen * framesize); if (unlikely(out == NULL)) _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
