commit | b51457f8d915e0ed8edf66d1d2c263ab4a792be8 | [log] [tgz] |
---|---|---|
author | Andy Hung <hunga@google.com> | Mon Nov 17 13:42:01 2014 -0800 |
committer | Andy Hung <hunga@google.com> | Mon Nov 17 13:46:12 2014 -0800 |
tree | e4abde0a9cd2782282bf2bb4ed0687b21f207e25 | |
parent | 97e6ca1a0be83e420ab238d9a1c31d3112126646 [diff] [blame] |
Fix race condition in signaling completion for decode. Bug: 18048775 Change-Id: I2207eb2cf30cf205d9bf414edbb1d3e709185f67
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp index c120898..d461af3 100644 --- a/media/libmediaplayerservice/MediaPlayerService.cpp +++ b/media/libmediaplayerservice/MediaPlayerService.cpp
@@ -2125,6 +2125,7 @@ // immutable with respect to future writes. // // It is thus safe for another thread to read the AudioCache. + Mutex::Autolock lock(mLock); mCommandComplete = true; mSignal.signal(); }