diff options
author | Wei Jia <wjia@google.com> | 2014-09-23 10:55:35 -0700 |
---|---|---|
committer | Wei Jia <wjia@google.com> | 2014-09-23 13:53:58 -0700 |
commit | 7e9f7f7a9fb6c5d93fc9163e32936f3ea284caad (patch) | |
tree | 8edc441f5b1370c3e4825eb439c83d8cac802c3b /media | |
parent | 3cdd6b8c82f2c71054bdd767782fc78f501f8e62 (diff) | |
download | frameworks_av-7e9f7f7a9fb6c5d93fc9163e32936f3ea284caad.zip frameworks_av-7e9f7f7a9fb6c5d93fc9163e32936f3ea284caad.tar.gz frameworks_av-7e9f7f7a9fb6c5d93fc9163e32936f3ea284caad.tar.bz2 |
NuPlayer: change assert to conditional check.
Bug: 17491050
Change-Id: I657866c5342c227d57617eb89955897171eb5976
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; } |