[vlc-devel] [PATCH] Speex_Resampler: reject samplerates above 96kHz

Jean-Baptiste Kempf jb at videolan.org
Fri Apr 6 00:32:39 CEST 2012


works in 88.2kHz
Should close #5781
---
 modules/audio_filter/resampler/speex.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/audio_filter/resampler/speex.c b/modules/audio_filter/resampler/speex.c
index 561261a..77e77bd 100644
--- a/modules/audio_filter/resampler/speex.c
+++ b/modules/audio_filter/resampler/speex.c
@@ -62,7 +62,8 @@ static int Open (vlc_object_t *obj)
      || filter->fmt_in.audio.i_physical_channels
                                   != filter->fmt_out.audio.i_physical_channels
      || filter->fmt_in.audio.i_original_channels
-                                  != filter->fmt_out.audio.i_original_channels)
+                                  != filter->fmt_out.audio.i_original_channels
+     || filter->fmt_in.audio.i_rate >= 96000)
         return VLC_EGENERIC;
 
     switch (filter->fmt_in.audio.i_format)
-- 
1.7.9.6




More information about the vlc-devel mailing list