commit | 1243869fb29ee580fa5c179443420c06a779dbfd | [log] [tgz] |
---|---|---|
author | Wei Jia <wjia@google.com> | Mon Mar 28 14:12:57 2016 -0700 |
committer | Wei Jia <wjia@google.com> | Mon Mar 28 14:12:57 2016 -0700 |
tree | c79ad4b96bb2ae8a01928c6f56f8a9ec2d376995 | |
parent | ca0cde2597b527083a2f86bda4db00dccaf394d6 [diff] [blame] |
MediaPlayer: use mLock to prevent racing condition. Bug: 27823938 Change-Id: Iad156f3b35fdcccb13ad5c49921bbe3cc4fc0c47
diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp index 25c9fb1..2795101 100644 --- a/media/libmedia/mediaplayer.cpp +++ b/media/libmedia/mediaplayer.cpp
@@ -907,6 +907,7 @@ } status_t MediaPlayer::setNextMediaPlayer(const sp<MediaPlayer>& next) { + Mutex::Autolock _l(mLock); if (mPlayer == NULL) { return NO_INIT; }