[vlc-commits] opensles: use locks in TimeGet
Rafaël Carré
git at videolan.org
Sat Dec 15 12:32:16 CET 2012
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Sat Dec 15 12:30:40 2012 +0100| [1807026248daa6491f98937574d3b692d41dd625] | committer: Rafaël Carré
opensles: use locks in TimeGet
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1807026248daa6491f98937574d3b692d41dd625
---
modules/audio_output/opensles_android.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules/audio_output/opensles_android.c b/modules/audio_output/opensles_android.c
index 7840730..6b4af8f 100644
--- a/modules/audio_output/opensles_android.c
+++ b/modules/audio_output/opensles_android.c
@@ -141,7 +141,11 @@ static void Pause(audio_output_t *p_aout, bool pause, mtime_t date)
static int TimeGet(audio_output_t* p_aout, mtime_t* restrict drift)
{
aout_sys_t *p_sys = p_aout->sys;
+
+ vlc_mutex_lock( &p_sys->lock );
mtime_t delay = p_sys->length;
+ vlc_mutex_unlock( &p_sys->lock );
+
SLAndroidSimpleBufferQueueState st;
SLresult res = GetState(p_sys->playerBufferQueue, &st);
if (unlikely(res != SL_RESULT_SUCCESS)) {
More information about the vlc-commits
mailing list