Loading media/libmediaplayerservice/nuplayer/NuPlayer.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -1257,6 +1257,13 @@ void NuPlayer::onSourceNotify(const sp<AMessage> &msg) { switch (what) { case Source::kWhatPrepared: { if (mSource == NULL) { // This is a stale notification from a source that was // asynchronously preparing when the client called reset(). // We handled the reset, the source is gone. break; } int32_t err; CHECK(msg->findInt32("err", &err)); Loading media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp +16 −0 Original line number Diff line number Diff line Loading @@ -333,6 +333,14 @@ status_t NuPlayerDriver::reset() { case STATE_RESET_IN_PROGRESS: return INVALID_OPERATION; case STATE_PREPARING: { CHECK(mIsAsyncPrepare); notifyListener(MEDIA_PREPARED); break; } default: break; } Loading Loading @@ -503,6 +511,14 @@ void NuPlayerDriver::notifySetDataSourceCompleted(status_t err) { void NuPlayerDriver::notifyPrepareCompleted(status_t err) { Mutex::Autolock autoLock(mLock); if (mState != STATE_PREPARING) { // We were preparing asynchronously when the client called // reset(), we sent a premature "prepared" notification and // then initiated the reset. This notification is stale. CHECK(mState == STATE_RESET_IN_PROGRESS || mState == STATE_IDLE); return; } CHECK_EQ(mState, STATE_PREPARING); mAsyncResult = err; Loading Loading
media/libmediaplayerservice/nuplayer/NuPlayer.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -1257,6 +1257,13 @@ void NuPlayer::onSourceNotify(const sp<AMessage> &msg) { switch (what) { case Source::kWhatPrepared: { if (mSource == NULL) { // This is a stale notification from a source that was // asynchronously preparing when the client called reset(). // We handled the reset, the source is gone. break; } int32_t err; CHECK(msg->findInt32("err", &err)); Loading
media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp +16 −0 Original line number Diff line number Diff line Loading @@ -333,6 +333,14 @@ status_t NuPlayerDriver::reset() { case STATE_RESET_IN_PROGRESS: return INVALID_OPERATION; case STATE_PREPARING: { CHECK(mIsAsyncPrepare); notifyListener(MEDIA_PREPARED); break; } default: break; } Loading Loading @@ -503,6 +511,14 @@ void NuPlayerDriver::notifySetDataSourceCompleted(status_t err) { void NuPlayerDriver::notifyPrepareCompleted(status_t err) { Mutex::Autolock autoLock(mLock); if (mState != STATE_PREPARING) { // We were preparing asynchronously when the client called // reset(), we sent a premature "prepared" notification and // then initiated the reset. This notification is stale. CHECK(mState == STATE_RESET_IN_PROGRESS || mState == STATE_IDLE); return; } CHECK_EQ(mState, STATE_PREPARING); mAsyncResult = err; Loading