summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2015-10-23 03:17:14 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2015-10-23 03:17:14 -0700
commit27194a9abb4fbeeac4efc8c14aab127f8550742e (patch)
treed0df6a9d859dfbce709d045c7553eb9d0c21a804 /media
parent99a7726b57ec6f2330a6376339fe43002f1fe940 (diff)
parent91ba994751d54026381d7718efbcc849a75c20fe (diff)
downloadframeworks_av-27194a9abb4fbeeac4efc8c14aab127f8550742e.zip
frameworks_av-27194a9abb4fbeeac4efc8c14aab127f8550742e.tar.gz
frameworks_av-27194a9abb4fbeeac4efc8c14aab127f8550742e.tar.bz2
Merge "nuplayer: Fix de-referencing NULL mSource"
Diffstat (limited to 'media')
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
index 356c519..6305a02 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
@@ -1526,7 +1526,10 @@ status_t NuPlayer::instantiateDecoder(bool audio, sp<DecoderBase> *decoder) {
if (*decoder != NULL || (audio && mFlushingAudio == SHUT_DOWN)) {
return OK;
}
-
+ if (mSource == NULL) {
+ ALOGD("%s Ignore instantiate decoder after clearing source", __func__);
+ return INVALID_OPERATION;
+ }
sp<AMessage> format = mSource->getFormat(audio);
if (format == NULL) {