summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2016-03-10 18:16:58 -0800
committerSteve Kondik <steve@cyngn.com>2016-03-10 18:16:58 -0800
commitbc7ce29314a914e467bcbf51db0836d80753a7a1 (patch)
treef885ff73c75cacfb1db919316126474d9c6f2a85 /media/libmediaplayerservice
parentba3877845ec7b34fd13393aeed7ad74dcb727a4c (diff)
parent9dacf2727c5919faea7cc103eeedfceceeff83b6 (diff)
downloadframeworks_av-bc7ce29314a914e467bcbf51db0836d80753a7a1.zip
frameworks_av-bc7ce29314a914e467bcbf51db0836d80753a7a1.tar.gz
frameworks_av-bc7ce29314a914e467bcbf51db0836d80753a7a1.tar.bz2
Merge tag 'android-6.0.1_r22' of https://android.googlesource.com/platform/frameworks/av into cm-13.0
Android 6.0.1 release 22
Diffstat (limited to 'media/libmediaplayerservice')
-rw-r--r--media/libmediaplayerservice/MediaPlayerService.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp
index da5bb9a..1e911c2 100644
--- a/media/libmediaplayerservice/MediaPlayerService.cpp
+++ b/media/libmediaplayerservice/MediaPlayerService.cpp
@@ -1936,8 +1936,13 @@ void MediaPlayerService::AudioOutput::pause()
void MediaPlayerService::AudioOutput::close()
{
ALOGV("close");
- Mutex::Autolock lock(mLock);
- close_l();
+ sp<AudioTrack> track;
+ {
+ Mutex::Autolock lock(mLock);
+ track = mTrack;
+ close_l(); // clears mTrack
+ }
+ // destruction of the track occurs outside of mutex.
}
void MediaPlayerService::AudioOutput::setVolume(float left, float right)