[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:21:02 CET 2009
vlc | branch: 1.0-bugfix | Rémi Denis-Courmont <remi at remlab.net> | Sun Nov 29 13:16:51 2009 +0200| [ebf3e8de0c47cf13a06d3e2377496697552e411c] | committer: Rémi Denis-Courmont
Fix potential deadlock when changing audio channels (fixes #2240)
(cherry picked from commit 66b2d87574e61f5bf293ffd29235819805d0fd96)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ebf3e8de0c47cf13a06d3e2377496697552e411c
---
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 a780db6..3f517d7 100644
--- a/src/audio_output/intf.c
+++ b/src/audio_output/intf.c
@@ -371,15 +371,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