summaryrefslogtreecommitdiffstats
path: root/media/libmedia/mediaplayer.cpp
diff options
context:
space:
mode:
authorNicolas Catania <niko@google.com>2010-03-11 08:16:26 -0800
committerNicolas Catania <niko@google.com>2010-03-11 08:16:26 -0800
commit64fb06f698b39759a7a2ebacd0a175949b7506a5 (patch)
treee84270c1d12f3e28a3e26a96deff7ef41ace48b9 /media/libmedia/mediaplayer.cpp
parent8d20cd5d15bf008abf43cbd00eadf90cd3e4b84e (diff)
downloadframeworks_av-64fb06f698b39759a7a2ebacd0a175949b7506a5.zip
frameworks_av-64fb06f698b39759a7a2ebacd0a175949b7506a5.tar.gz
frameworks_av-64fb06f698b39759a7a2ebacd0a175949b7506a5.tar.bz2
Revert "Allow invoke in all the player states except idle and error."
This reverts commit 88f3b81d065d4bec6f69a25eda99158e254f55b1.
Diffstat (limited to 'media/libmedia/mediaplayer.cpp')
-rw-r--r--media/libmedia/mediaplayer.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp
index 9fc06cd..f623295 100644
--- a/media/libmedia/mediaplayer.cpp
+++ b/media/libmedia/mediaplayer.cpp
@@ -159,10 +159,8 @@ status_t MediaPlayer::setDataSource(int fd, int64_t offset, int64_t length)
status_t MediaPlayer::invoke(const Parcel& request, Parcel *reply)
{
Mutex::Autolock _l(mLock);
- const bool hasBeenInitialized =
- (mCurrentState != MEDIA_PLAYER_STATE_ERROR) &&
- ((mCurrentState & MEDIA_PLAYER_IDLE) != MEDIA_PLAYER_STATE_IDLE);
- if ((mPlayer != NULL) && hasBeenInitialized) {
+ if ((mPlayer != NULL) && ( mCurrentState & MEDIA_PLAYER_INITIALIZED ))
+ {
LOGV("invoke %d", request.dataSize());
return mPlayer->invoke(request, reply);
}