]> git.sesse.net Git - vlc/commitdiff
Fixed two major bugs in the audio output, triggering segfault when going
authorChristophe Massiot <massiot@videolan.org>
Tue, 21 Jan 2003 10:29:12 +0000 (10:29 +0000)
committerChristophe Massiot <massiot@videolan.org>
Tue, 21 Jan 2003 10:29:12 +0000 (10:29 +0000)
to mono mode, and probably at some other places.

src/audio_output/filters.c
src/audio_output/intf.c

index 11bc5bb2f3a0a16a9b124dcf0902ccfd95578e10..3579029fc11201b91dfd3cda44d40cd83bc14200 100644 (file)
@@ -2,7 +2,7 @@
  * filters.c : audio output filters management
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: filters.c,v 1.16 2002/12/10 21:55:01 gbazin Exp $
+ * $Id: filters.c,v 1.17 2003/01/21 10:29:12 massiot Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -97,6 +97,7 @@ static int SplitConversion( const audio_sample_format_t * p_input_format,
         if ( !b_format || !b_channels )
         {
             p_middle_format->i_rate = p_input_format->i_rate;
+            aout_FormatPrepare( p_middle_format );
             return 1;
         }
 
@@ -105,11 +106,13 @@ static int SplitConversion( const audio_sample_format_t * p_input_format,
              = p_input_format->i_physical_channels;
         p_middle_format->i_original_channels
              = p_input_format->i_original_channels;
+        aout_FormatPrepare( p_middle_format );
         return 1;
     }
 
     /* i_nb_conversion == 3 */
     p_middle_format->i_rate = p_input_format->i_rate;
+    aout_FormatPrepare( p_middle_format );
     return 2;
 }
 
index 1407fbe94099ae053b59fbb3c05a504a6d7bf34c..1c6bf14308640d67968e96d6fd04a2feb6dd28d9 100644 (file)
@@ -2,7 +2,7 @@
  * intf.c : audio output API towards the interface modules
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: intf.c,v 1.14 2003/01/16 14:08:39 massiot Exp $
+ * $Id: intf.c,v 1.15 2003/01/21 10:29:12 massiot Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -416,6 +416,7 @@ int aout_Restart( aout_instance_t * p_aout )
         aout_input_t * p_input = p_aout->pp_inputs[i];
 
         b_error |= aout_InputNew( p_aout, p_input );
+        p_input->b_changed = 1;
         vlc_mutex_unlock( &p_input->lock );
     }