Commit 20090257 authored by Christophe Massiot's avatar Christophe Massiot

Fixed two major bugs in the audio output, triggering segfault when going

to mono mode, and probably at some other places.
parent 1d385240
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* filters.c : audio output filters management * filters.c : audio output filters management
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * 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> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -97,6 +97,7 @@ static int SplitConversion( const audio_sample_format_t * p_input_format, ...@@ -97,6 +97,7 @@ static int SplitConversion( const audio_sample_format_t * p_input_format,
if ( !b_format || !b_channels ) if ( !b_format || !b_channels )
{ {
p_middle_format->i_rate = p_input_format->i_rate; p_middle_format->i_rate = p_input_format->i_rate;
aout_FormatPrepare( p_middle_format );
return 1; return 1;
} }
...@@ -105,11 +106,13 @@ static int SplitConversion( const audio_sample_format_t * p_input_format, ...@@ -105,11 +106,13 @@ static int SplitConversion( const audio_sample_format_t * p_input_format,
= p_input_format->i_physical_channels; = p_input_format->i_physical_channels;
p_middle_format->i_original_channels p_middle_format->i_original_channels
= p_input_format->i_original_channels; = p_input_format->i_original_channels;
aout_FormatPrepare( p_middle_format );
return 1; return 1;
} }
/* i_nb_conversion == 3 */ /* i_nb_conversion == 3 */
p_middle_format->i_rate = p_input_format->i_rate; p_middle_format->i_rate = p_input_format->i_rate;
aout_FormatPrepare( p_middle_format );
return 2; return 2;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf.c : audio output API towards the interface modules * intf.c : audio output API towards the interface modules
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * 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> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -416,6 +416,7 @@ int aout_Restart( aout_instance_t * p_aout ) ...@@ -416,6 +416,7 @@ int aout_Restart( aout_instance_t * p_aout )
aout_input_t * p_input = p_aout->pp_inputs[i]; aout_input_t * p_input = p_aout->pp_inputs[i];
b_error |= aout_InputNew( p_aout, p_input ); b_error |= aout_InputNew( p_aout, p_input );
p_input->b_changed = 1;
vlc_mutex_unlock( &p_input->lock ); vlc_mutex_unlock( &p_input->lock );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment