diff options
Diffstat (limited to 'media/libmediaplayerservice/nuplayer/NuPlayer.cpp')
-rw-r--r-- | media/libmediaplayerservice/nuplayer/NuPlayer.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp index d433a4d..a28591e 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp @@ -537,7 +537,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { sp<RefBase> obj; CHECK(msg->findObject("native-window", &obj)); - if (mSource->getFormat(false /* audio */) == NULL) { + if (mSource == NULL || mSource->getFormat(false /* audio */) == NULL) { performSetSurface(static_cast<NativeWindowWrapper *>(obj.get())); break; } @@ -1667,6 +1667,10 @@ void NuPlayer::onSourceNotify(const sp<AMessage> &msg) { sp<NuPlayerDriver> driver = mDriver.promote(); if (driver != NULL) { + if ((flags & NuPlayer::Source::FLAG_CAN_SEEK) == 0) { + driver->notifyListener( + MEDIA_INFO, MEDIA_INFO_NOT_SEEKABLE, 0); + } driver->notifyFlagsChanged(flags); } |