diff options
Diffstat (limited to 'media')
-rw-r--r-- | media/libmediaplayerservice/nuplayer/NuPlayer.cpp | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp index b589909..2ea12ae 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp @@ -984,17 +984,31 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { case kWhatPause: { - CHECK(mRenderer != NULL); - mSource->pause(); - mRenderer->pause(); + if (mSource != NULL) { + mSource->pause(); + } else { + ALOGW("pause called when source is gone or not set"); + } + if (mRenderer != NULL) { + mRenderer->pause(); + } else { + ALOGW("pause called when renderer is gone or not set"); + } break; } case kWhatResume: { - CHECK(mRenderer != NULL); - mSource->resume(); - mRenderer->resume(); + if (mSource != NULL) { + mSource->resume(); + } else { + ALOGW("resume called when source is gone or not set"); + } + if (mRenderer != NULL) { + mRenderer->resume(); + } else { + ALOGW("resume called when renderer is gone or not set"); + } break; } |