diff options
author | Andreas Huber <> | 2009-03-24 20:47:19 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-24 20:47:19 -0700 |
commit | e25b51baf43bab5b8c19546a93c0bf73025ffbee (patch) | |
tree | e7e40afde4999f7e7098cfec46176a439ce98630 /media/libmedia | |
parent | 997c7612a8cf63748165144b423ff2ae8e73c3e9 (diff) | |
download | frameworks_base-e25b51baf43bab5b8c19546a93c0bf73025ffbee.zip frameworks_base-e25b51baf43bab5b8c19546a93c0bf73025ffbee.tar.gz frameworks_base-e25b51baf43bab5b8c19546a93c0bf73025ffbee.tar.bz2 |
Automated import from //branches/donutburger/...@141711,141711
Diffstat (limited to 'media/libmedia')
-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; |