]> git.sesse.net Git - vlc/commitdiff
* Don't use the bandlimited resampler for downsampling (skew resampling for instance...
authorDerk-Jan Hartman <hartman@videolan.org>
Wed, 10 Aug 2005 14:12:17 +0000 (14:12 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Wed, 10 Aug 2005 14:12:17 +0000 (14:12 +0000)
 - on a side note, it also seems to fix the stack corruption (resulting in deadlock) issues i was having with audio output that was being resampled by auhal.

modules/audio_filter/resampler/bandlimited.c

index a0c294b800ca748c23119fe918c059bb0302fea8..41fd4ce2632afbb9c71fb3e53e3276e6f34821df 100644 (file)
@@ -124,6 +124,12 @@ static int Create( vlc_object_t *p_this )
     /* Calculate worst case for the length of the filter wing */
     d_factor = (double)p_filter->output.i_rate
                         / p_filter->input.i_rate;
+
+    if( d_factor < (double)1.0 )
+    {
+        return VLC_EGENERIC;
+    }
+
     i_filter_wing = ((SMALL_FILTER_NMULT + 1)/2.0)
                       * __MAX(1.0, 1.0/d_factor) + 10;
     p_filter->p_sys->i_buf_size = aout_FormatNbChannels( &p_filter->input ) *