[vlc-devel] commit: audio_output: Properly lock the input_fifos_lock in aout_Restart. ( Pierre d'Herbemont )
git version control
git at videolan.org
Tue Aug 12 01:15:44 CEST 2008
vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Tue Aug 12 01:06:55 2008 +0200| [f4132b2e81b4d3e2a1080c075f5249c0403b1374] | committer: Pierre d'Herbemont
audio_output: Properly lock the input_fifos_lock in aout_Restart.
(Should fix a number of crash^W assert report that we had in apple-bugreport ml).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f4132b2e81b4d3e2a1080c075f5249c0403b1374
---
src/audio_output/intf.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/audio_output/intf.c b/src/audio_output/intf.c
index ae41f05..5bec5b9 100644
--- a/src/audio_output/intf.c
+++ b/src/audio_output/intf.c
@@ -379,6 +379,8 @@ static int aout_Restart( aout_instance_t * p_aout )
}
/* Lock all inputs. */
+ vlc_mutex_lock( &p_aout->input_fifos_lock );
+
for ( i = 0; i < p_aout->i_nb_inputs; i++ )
{
vlc_mutex_lock( &p_aout->pp_inputs[i]->lock );
@@ -397,6 +399,7 @@ static int aout_Restart( aout_instance_t * p_aout )
{
vlc_mutex_unlock( &p_aout->pp_inputs[i]->lock );
}
+ vlc_mutex_unlock( &p_aout->input_fifos_lock );
vlc_mutex_unlock( &p_aout->mixer_lock );
return -1;
}
@@ -408,6 +411,7 @@ static int aout_Restart( aout_instance_t * p_aout )
{
vlc_mutex_unlock( &p_aout->pp_inputs[i]->lock );
}
+ vlc_mutex_unlock( &p_aout->input_fifos_lock );
vlc_mutex_unlock( &p_aout->mixer_lock );
return -1;
}
@@ -422,6 +426,7 @@ static int aout_Restart( aout_instance_t * p_aout )
vlc_mutex_unlock( &p_input->lock );
}
+ vlc_mutex_unlock( &p_aout->input_fifos_lock );
vlc_mutex_unlock( &p_aout->mixer_lock );
return b_error;
More information about the vlc-devel
mailing list