]> git.sesse.net Git - vlc/commitdiff
- correct calculation of the size of the overflow buffer
authorBoris Dorès <babal@videolan.org>
Sun, 11 Dec 2005 21:11:46 +0000 (21:11 +0000)
committerBoris Dorès <babal@videolan.org>
Sun, 11 Dec 2005 21:11:46 +0000 (21:11 +0000)
  (fixes a crash with mono streams)

AUTHORS
modules/audio_filter/channel_mixer/headphone.c

diff --git a/AUTHORS b/AUTHORS
index 04fd3cb37349edf1593fa0504fbbbd9bf037e118..f237432b60ed27ef46701294b27f47f75f9fbf2a 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -150,7 +150,8 @@ E: babal(at)via.ecp.fr
 C: babal
 D: Win32 network input
 D: Win32 interface
-D: Headphone channel mixer
+D: Headphone channel mixer, Dolby Surround decoder
+D: Audio output core enhancements
 S: France
 
 N: Jean-Marc Dressler
index da3762fc3a1ba9650f2e040ea551b6f640969ffa..902559268e2b14ed0600f3805997d119abca4a14 100644 (file)
@@ -315,12 +315,10 @@ static int Init ( aout_filter_t * p_filter , struct aout_filter_sys_t * p_data
     for ( i = 0 ; i < p_data->i_nb_atomic_operations ; i++ )
     {
         if ( p_data->i_overflow_buffer_size
-                < p_data->p_atomic_operations[i].i_delay * i_nb_channels
-                * sizeof (float) )
+                < p_data->p_atomic_operations[i].i_delay * 2 * sizeof (float) )
         {
             p_data->i_overflow_buffer_size
-                = p_data->p_atomic_operations[i].i_delay * i_nb_channels
-                * sizeof (float);
+                = p_data->p_atomic_operations[i].i_delay * 2 * sizeof (float);
         }
     }
     p_data->p_overflow_buffer = malloc ( p_data->i_overflow_buffer_size );
@@ -402,7 +400,7 @@ static int Create( vlc_object_t *p_this )
     if ( Init( p_filter , p_filter->p_sys
                 , aout_FormatNbChannels ( &p_filter->input )
                 , p_filter->input.i_physical_channels
-                ,  p_filter->input.i_rate ) < 0 )
+                , p_filter->input.i_rate ) < 0 )
     {
         return VLC_EGENERIC;
     }