[vlc-devel] commit: Fix potential deadlock when changing audio channels (fixes #2240) ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sun Nov 29 12:17:51 CET 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Nov 29 13:16:51 2009 +0200| [66b2d87574e61f5bf293ffd29235819805d0fd96] | committer: Rémi Denis-Courmont
Fix potential deadlock when changing audio channels (fixes #2240)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=66b2d87574e61f5bf293ffd29235819805d0fd96
---
src/audio_output/intf.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/audio_output/intf.c b/src/audio_output/intf.c
index 1e0d8b9..3476ad3 100644
--- a/src/audio_output/intf.c
+++ b/src/audio_output/intf.c
@@ -286,15 +286,16 @@ static int aout_Restart( aout_instance_t * p_aout )
return -1;
}
- /* Lock all inputs. */
- aout_lock_input_fifos( p_aout );
-
for ( i = 0; i < p_aout->i_nb_inputs; i++ )
{
aout_lock_input( p_aout, p_aout->pp_inputs[i] );
+ aout_lock_input_fifos( p_aout );
aout_InputDelete( p_aout, p_aout->pp_inputs[i] );
+ aout_unlock_input_fifos( p_aout );
}
+ /* Lock all inputs. */
+ aout_lock_input_fifos( p_aout );
aout_MixerDelete( p_aout );
/* Re-open the output plug-in. */
More information about the vlc-devel
mailing list