summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2013-04-25 15:11:19 -0700
committerAndreas Huber <andih@google.com>2013-04-25 15:11:19 -0700
commitb5f28d4749b898d92fe5e56236b417e37b6fe84f (patch)
tree944512c454d0add19a0ff4036299495e3fd32027 /media/libmediaplayerservice/nuplayer/NuPlayer.cpp
parent7f86d98317843838c4a5248c733bf95f9574fcab (diff)
downloadframeworks_av-b5f28d4749b898d92fe5e56236b417e37b6fe84f.zip
frameworks_av-b5f28d4749b898d92fe5e56236b417e37b6fe84f.tar.gz
frameworks_av-b5f28d4749b898d92fe5e56236b417e37b6fe84f.tar.bz2
Handle the case where an asynchronous prepare was initiated and then
the mediaplayer was reset. Change-Id: Ib241747c5dc002b88a3854569c1f8340b2a8ef41 related-to-bug: 8688986
Diffstat (limited to 'media/libmediaplayerservice/nuplayer/NuPlayer.cpp')
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayer.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
index 607ec6a..b89b1c8 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
@@ -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));