Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1098d87e authored by Robert Shih's avatar Robert Shih
Browse files

HTTPLiveSource: NULL check in getFormat

Bug: 18297916
Change-Id: I14c5de8d28202ee1b68e369d33e01bd26dbe968d
parent ed1e55c5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -98,6 +98,10 @@ void NuPlayer::HTTPLiveSource::start() {
}

sp<AMessage> NuPlayer::HTTPLiveSource::getFormat(bool audio) {
    if (mLiveSession == NULL) {
        return NULL;
    }

    sp<AMessage> format;
    status_t err = mLiveSession->getStreamFormat(
            audio ? LiveSession::STREAMTYPE_AUDIO