summaryrefslogtreecommitdiffstats
path: root/media/libmedia/mediaplayer.cpp
diff options
context:
space:
mode:
authorAndreas Huber <>2009-03-24 20:47:19 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-24 20:47:19 -0700
commit4003bf5e4cd948fe7732c16b2a683acdbfa8c44d (patch)
treefd9df04a47016b0c46d32f2f608d45d5c5731a08 /media/libmedia/mediaplayer.cpp
parent3c4b3e3f8927dd149df87bb98646497c7043d0ae (diff)
downloadframeworks_av-4003bf5e4cd948fe7732c16b2a683acdbfa8c44d.zip
frameworks_av-4003bf5e4cd948fe7732c16b2a683acdbfa8c44d.tar.gz
frameworks_av-4003bf5e4cd948fe7732c16b2a683acdbfa8c44d.tar.bz2
Automated import from //branches/donutburger/...@141711,141711
Diffstat (limited to 'media/libmedia/mediaplayer.cpp')
-rw-r--r--media/libmedia/mediaplayer.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp
index 5841922..809316a 100644
--- a/media/libmedia/mediaplayer.cpp
+++ b/media/libmedia/mediaplayer.cpp
@@ -416,8 +416,12 @@ status_t MediaPlayer::seekTo_l(int msec)
status_t MediaPlayer::seekTo(int msec)
{
+ mLockThreadId = getThreadId();
Mutex::Autolock _l(mLock);
- return seekTo_l(msec);
+ status_t result = seekTo_l(msec);
+ mLockThreadId = 0;
+
+ return result;
}
status_t MediaPlayer::reset()
@@ -501,8 +505,9 @@ void MediaPlayer::notify(int msg, int ext1, int ext2)
// this will deadlock.
//
// The threadId hack below works around this for the care of prepare
- // within the same process.
-
+ // and seekTo within the same process.
+ // FIXME: Remember, this is a hack, it's not even a hack that is applied
+ // consistently for all use-cases, this needs to be revisited.
if (mLockThreadId != getThreadId()) {
mLock.lock();
locked = true;