Changeset aeade697a0629f3a2520c17e2fbb7e445cfc6b7c
- 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
| rec51872 |
raeade69 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Christophe Massiot <massiot@via.ecp.fr> |
|---|
| … | … | |
| 129 | 129 | struct aout_buffer_t * ); |
|---|
| 130 | 130 | |
|---|
| 131 | | /* If b_error == 1, there is no mixer nor audio output pipeline. */ |
|---|
| | 131 | /* If b_error == 1, there is no mixer. */ |
|---|
| 132 | 132 | vlc_bool_t b_error; |
|---|
| 133 | 133 | /* Multiplier used to raise or lower the volume of the sound in |
|---|
| … | … | |
| 203 | 203 | /* Saved volume for aout_VolumeMute(). */ |
|---|
| 204 | 204 | audio_volume_t i_saved_volume; |
|---|
| | 205 | |
|---|
| | 206 | /* If b_error == 1, there is no audio output pipeline. */ |
|---|
| | 207 | vlc_bool_t b_error; |
|---|
| 205 | 208 | } aout_output_t; |
|---|
| 206 | 209 | |
|---|
| … | … | |
| 265 | 268 | /* From mixer.c : */ |
|---|
| 266 | 269 | int aout_MixerNew( aout_instance_t * p_aout ); |
|---|
| 267 | | int aout_MixerDelete( aout_instance_t * p_aout ); |
|---|
| | 270 | void aout_MixerDelete( aout_instance_t * p_aout ); |
|---|
| 268 | 271 | void aout_MixerRun( aout_instance_t * p_aout ); |
|---|
| 269 | 272 | int aout_MixerMultiplierSet( aout_instance_t * p_aout, float f_multiplier ); |
|---|
| r128f5ba |
raeade69 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Christophe Massiot <massiot@via.ecp.fr> |
|---|
| … | … | |
| 60 | 60 | p_aout->mixer.f_multiplier = 1.0; |
|---|
| 61 | 61 | p_aout->mixer.b_error = 1; |
|---|
| | 62 | p_aout->output.b_error = 1; |
|---|
| 62 | 63 | p_aout->output.b_starving = 1; |
|---|
| 63 | 64 | |
|---|
| r1da4377 |
raeade69 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Christophe Massiot <massiot@via.ecp.fr> |
|---|
| … | … | |
| 59 | 59 | * Please note that you must hold the mixer lock. |
|---|
| 60 | 60 | *****************************************************************************/ |
|---|
| 61 | | int aout_MixerDelete( aout_instance_t * p_aout ) |
|---|
| 62 | | { |
|---|
| 63 | | if ( p_aout->mixer.b_error ) return 0; |
|---|
| | 61 | void aout_MixerDelete( aout_instance_t * p_aout ) |
|---|
| | 62 | { |
|---|
| | 63 | if ( p_aout->mixer.b_error ) return; |
|---|
| 64 | 64 | module_Unneed( p_aout, p_aout->mixer.p_module ); |
|---|
| 65 | 65 | p_aout->mixer.b_error = 1; |
|---|
| 66 | | |
|---|
| 67 | | return 0; |
|---|
| 68 | 66 | } |
|---|
| 69 | 67 | |
|---|
| re8ce66c |
raeade69 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Christophe Massiot <massiot@via.ecp.fr> |
|---|
| … | … | |
| 201 | 201 | &p_aout->mixer.output_alloc ); |
|---|
| 202 | 202 | |
|---|
| | 203 | p_aout->output.b_error = 0; |
|---|
| 203 | 204 | return 0; |
|---|
| 204 | 205 | } |
|---|
| … | … | |
| 211 | 212 | void aout_OutputDelete( aout_instance_t * p_aout ) |
|---|
| 212 | 213 | { |
|---|
| | 214 | if ( p_aout->output.b_error ) return 0; |
|---|
| 213 | 215 | module_Unneed( p_aout, p_aout->output.p_module ); |
|---|
| 214 | 216 | |
|---|
| … | … | |
| 216 | 218 | p_aout->output.i_nb_filters ); |
|---|
| 217 | 219 | aout_FifoDestroy( p_aout, &p_aout->output.fifo ); |
|---|
| | 220 | |
|---|
| | 221 | p_aout->output.b_error = 1; |
|---|
| 218 | 222 | } |
|---|
| 219 | 223 | |
|---|