summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorWei Jia <wjia@google.com>2014-09-24 04:13:03 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-09-24 04:13:03 +0000
commitc090e90241bcf0475f48f930e0f592e8716b8d15 (patch)
tree8436403ea4d79575eca5a1fac238026ecc6d591b /media
parent817c28d71d0d68a6eb25057bd04e555dc0b85cc4 (diff)
parent7e9f7f7a9fb6c5d93fc9163e32936f3ea284caad (diff)
downloadframeworks_av-c090e90241bcf0475f48f930e0f592e8716b8d15.zip
frameworks_av-c090e90241bcf0475f48f930e0f592e8716b8d15.tar.gz
frameworks_av-c090e90241bcf0475f48f930e0f592e8716b8d15.tar.bz2
am 7e9f7f7a: NuPlayer: change assert to conditional check.
* commit '7e9f7f7a9fb6c5d93fc9163e32936f3ea284caad': NuPlayer: change assert to conditional check.
Diffstat (limited to 'media')
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayer.cpp26
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;
}