Changeset aeade697a0629f3a2520c17e2fbb7e445cfc6b7c

Show
Ignore:
Timestamp:
23/01/03 18:13:28 (6 years ago)
Author:
Christophe Massiot <massiot@videolan.org>
git-committer:
Christophe Massiot <massiot@videolan.org> 1043342008 +0000
git-parent:

[8afb82e2c6dc616377ff5afafb326c35f3f36a59]

git-author:
Christophe Massiot <massiot@videolan.org> 1043342008 +0000
Message:

Fixed a segfault with quitting when no audio output plug-in was found
(closes #108).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/aout_internal.h

    rec51872 raeade69  
    33 ***************************************************************************** 
    44 * Copyright (C) 2002 VideoLAN 
    5  * $Id: aout_internal.h,v 1.36 2002/12/07 23:50:30 massiot Exp $ 
     5 * $Id: aout_internal.h,v 1.37 2003/01/23 17:13:28 massiot Exp $ 
    66 * 
    77 * Authors: Christophe Massiot <massiot@via.ecp.fr> 
     
    129129                                         struct aout_buffer_t * ); 
    130130 
    131     /* If b_error == 1, there is no mixer nor audio output pipeline. */ 
     131    /* If b_error == 1, there is no mixer. */ 
    132132    vlc_bool_t              b_error; 
    133133    /* Multiplier used to raise or lower the volume of the sound in 
     
    203203    /* Saved volume for aout_VolumeMute(). */ 
    204204    audio_volume_t          i_saved_volume; 
     205 
     206    /* If b_error == 1, there is no audio output pipeline. */ 
     207    vlc_bool_t              b_error; 
    205208} aout_output_t; 
    206209 
     
    265268/* From mixer.c : */ 
    266269int aout_MixerNew( aout_instance_t * p_aout ); 
    267 int aout_MixerDelete( aout_instance_t * p_aout ); 
     270void aout_MixerDelete( aout_instance_t * p_aout ); 
    268271void aout_MixerRun( aout_instance_t * p_aout ); 
    269272int aout_MixerMultiplierSet( aout_instance_t * p_aout, float f_multiplier ); 
  • src/audio_output/common.c

    r128f5ba raeade69  
    33 ***************************************************************************** 
    44 * Copyright (C) 2002 VideoLAN 
    5  * $Id: common.c,v 1.15 2003/01/22 18:31:47 massiot Exp $ 
     5 * $Id: common.c,v 1.16 2003/01/23 17:13:28 massiot Exp $ 
    66 * 
    77 * Authors: Christophe Massiot <massiot@via.ecp.fr> 
     
    6060    p_aout->mixer.f_multiplier = 1.0; 
    6161    p_aout->mixer.b_error = 1; 
     62    p_aout->output.b_error = 1; 
    6263    p_aout->output.b_starving = 1; 
    6364 
  • src/audio_output/mixer.c

    r1da4377 raeade69  
    33 ***************************************************************************** 
    44 * Copyright (C) 2002 VideoLAN 
    5  * $Id: mixer.c,v 1.23 2003/01/06 22:07:47 massiot Exp $ 
     5 * $Id: mixer.c,v 1.24 2003/01/23 17:13:28 massiot Exp $ 
    66 * 
    77 * Authors: Christophe Massiot <massiot@via.ecp.fr> 
     
    5959 * Please note that you must hold the mixer lock. 
    6060 *****************************************************************************/ 
    61 int aout_MixerDelete( aout_instance_t * p_aout ) 
    62 { 
    63     if ( p_aout->mixer.b_error ) return 0
     61void aout_MixerDelete( aout_instance_t * p_aout ) 
     62{ 
     63    if ( p_aout->mixer.b_error ) return
    6464    module_Unneed( p_aout, p_aout->mixer.p_module ); 
    6565    p_aout->mixer.b_error = 1; 
    66  
    67     return 0; 
    6866} 
    6967 
  • src/audio_output/output.c

    re8ce66c raeade69  
    33 ***************************************************************************** 
    44 * Copyright (C) 2002 VideoLAN 
    5  * $Id: output.c,v 1.32 2003/01/23 11:48:18 massiot Exp $ 
     5 * $Id: output.c,v 1.33 2003/01/23 17:13:28 massiot Exp $ 
    66 * 
    77 * Authors: Christophe Massiot <massiot@via.ecp.fr> 
     
    201201                             &p_aout->mixer.output_alloc ); 
    202202 
     203    p_aout->output.b_error = 0; 
    203204    return 0; 
    204205} 
     
    211212void aout_OutputDelete( aout_instance_t * p_aout ) 
    212213{ 
     214    if ( p_aout->output.b_error ) return 0; 
    213215    module_Unneed( p_aout, p_aout->output.p_module ); 
    214216 
     
    216218                                 p_aout->output.i_nb_filters ); 
    217219    aout_FifoDestroy( p_aout, &p_aout->output.fifo ); 
     220 
     221    p_aout->output.b_error = 1; 
    218222} 
    219223