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

Commit 3b9912bc authored by Robert Shih's avatar Robert Shih
Browse files

GenericSource: gracefully handle missing timestamp

Bug: 23474771
Change-Id: I1a1c03162fb08fa43607905ff2c6d4d594675001
parent b7b06be6
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1428,7 +1428,11 @@ void NuPlayer::GenericSource::readBuffer(

        if (err == OK) {
            int64_t timeUs;
            CHECK(mbuf->meta_data()->findInt64(kKeyTime, &timeUs));
            if (!mbuf->meta_data()->findInt64(kKeyTime, &timeUs)) {
                mbuf->meta_data()->dumpToLog();
                track->mPackets->signalEOS(ERROR_MALFORMED);
                break;
            }
            if (trackType == MEDIA_TRACK_TYPE_AUDIO) {
                mAudioTimeUs = timeUs;
                mBufferingMonitor->updateQueuedTime(true /* isAudio */, timeUs);