summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/private/ui/SharedState.h2
-rw-r--r--media/libmedia/AudioTrack.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/include/private/ui/SharedState.h b/include/private/ui/SharedState.h
index 3bc7979..c9f6b5e 100644
--- a/include/private/ui/SharedState.h
+++ b/include/private/ui/SharedState.h
@@ -98,6 +98,8 @@ struct layer_cblk_t // (128 bytes)
struct per_client_cblk_t // 4KB max
{
+ per_client_cblk_t() : lock(Mutex::SHARED) { }
+
Mutex lock;
Condition cv;
layer_cblk_t layers[NUM_LAYERS_MAX] __attribute__((aligned(32)));
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index af7dae5..7b9eda7 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -891,7 +891,7 @@ void AudioTrack::AudioTrackThread::onFirstRef()
// =========================================================================
audio_track_cblk_t::audio_track_cblk_t()
- : user(0), server(0), userBase(0), serverBase(0), buffers(0), frameCount(0),
+ : lock(Mutex::SHARED), user(0), server(0), userBase(0), serverBase(0), buffers(0), frameCount(0),
loopStart(UINT_MAX), loopEnd(UINT_MAX), loopCount(0), volumeLR(0), flowControlFlag(1), forceReady(0)
{
}