summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPraveen Chavan <pchavan@codeaurora.org>2015-09-29 02:25:47 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2015-10-06 17:14:26 -0700
commit79be96a22d7f6094a683ca22622f2de52755ac5b (patch)
tree0694fdbd9b936b5d64bd74d09bbf80193232bcbf /include
parentb3f0834aa448d6b4bf8dbddaff4fbcefa3ede422 (diff)
downloadframeworks_av-79be96a22d7f6094a683ca22622f2de52755ac5b.zip
frameworks_av-79be96a22d7f6094a683ca22622f2de52755ac5b.tar.gz
frameworks_av-79be96a22d7f6094a683ca22622f2de52755ac5b.tar.bz2
AudioSystem: Fix race condition in accessing ioDescriptors
The vector mIoDescriptors can be simultaneouly modified and accessed by 2 threads. Acquire a lock while wrapping the ioDescriptor in a sp<> Change-Id: I73c79ef8eca092b500a7ead3a5ebd0bcf75f9920
Diffstat (limited to 'include')
-rw-r--r--include/media/AudioSystem.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h
index 06116a5..26a0bb2 100644
--- a/include/media/AudioSystem.h
+++ b/include/media/AudioSystem.h
@@ -399,6 +399,7 @@ private:
uint32_t mInSamplingRate;
audio_format_t mInFormat;
audio_channel_mask_t mInChannelMask;
+ sp<AudioIoDescriptor> getIoDescriptor_l(audio_io_handle_t ioHandle);
};
class AudioPolicyServiceClient: public IBinder::DeathRecipient,