diff options
author | Andreas Huber <> | 2009-03-24 20:48:51 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-24 20:48:51 -0700 |
commit | 5cb07aa071b43a214e4c880b3b7852714e06451b (patch) | |
tree | fd9df04a47016b0c46d32f2f608d45d5c5731a08 /media/libmedia/mediaplayer.cpp | |
parent | 7f46607934437779720f1099e6b17f4db8c60ba1 (diff) | |
download | frameworks_av-5cb07aa071b43a214e4c880b3b7852714e06451b.zip frameworks_av-5cb07aa071b43a214e4c880b3b7852714e06451b.tar.gz frameworks_av-5cb07aa071b43a214e4c880b3b7852714e06451b.tar.bz2 |
Automated import from //branches/master/...@141712,141712
Diffstat (limited to 'media/libmedia/mediaplayer.cpp')
-rw-r--r-- | media/libmedia/mediaplayer.cpp | 11 |
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; |