summaryrefslogtreecommitdiffstats
path: root/include/media/MediaPlayerInterface.h
diff options
context:
space:
mode:
authorChong Zhang <chz@google.com>2014-10-24 18:53:44 -0700
committerChong Zhang <chz@google.com>2014-10-27 22:22:57 +0000
commitdf2592beab557663a471da2ac33ca463f7eee722 (patch)
tree3cbf80d5599885efcc103c129c799349bb70790d /include/media/MediaPlayerInterface.h
parent31551f8dd625b8d40961e141d2913b0073f852ab (diff)
downloadframeworks_av-df2592beab557663a471da2ac33ca463f7eee722.zip
frameworks_av-df2592beab557663a471da2ac33ca463f7eee722.tar.gz
frameworks_av-df2592beab557663a471da2ac33ca463f7eee722.tar.bz2
do not hold mNotifyLock when calling MediaPlayer::notify
Bug:18120688 Change-Id: Ia66dcfc3fd2d67d1ceba9808d21e0120cc8691d6
Diffstat (limited to 'include/media/MediaPlayerInterface.h')
-rw-r--r--include/media/MediaPlayerInterface.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/media/MediaPlayerInterface.h b/include/media/MediaPlayerInterface.h
index cf18a45..c412299 100644
--- a/include/media/MediaPlayerInterface.h
+++ b/include/media/MediaPlayerInterface.h
@@ -208,8 +208,15 @@ public:
void sendEvent(int msg, int ext1=0, int ext2=0,
const Parcel *obj=NULL) {
- Mutex::Autolock autoLock(mNotifyLock);
- if (mNotify) mNotify(mCookie, msg, ext1, ext2, obj);
+ notify_callback_f notifyCB;
+ void* cookie;
+ {
+ Mutex::Autolock autoLock(mNotifyLock);
+ notifyCB = mNotify;
+ cookie = mCookie;
+ }
+
+ if (notifyCB) notifyCB(cookie, msg, ext1, ext2, obj);
}
virtual status_t dump(int fd, const Vector<String16> &args) const {