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

Commit a0b3a0a4 authored by Wei Jia's avatar Wei Jia Committed by Android Git Automerger
Browse files

am 6e430fbd: Merge "NuPlayer: send NOT_SEEKABLE media info to client when the...

am 6e430fbd: Merge "NuPlayer: send NOT_SEEKABLE media info to client when the source is not seekable." into lmp-mr1-dev

* commit '6e430fbd':
  NuPlayer: send NOT_SEEKABLE media info to client when the source is not seekable.
parents aff13ad4 6e430fbd
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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);
            }

+2 −2
Original line number Diff line number Diff line
@@ -1109,11 +1109,11 @@ status_t LiveSession::onSeek(const sp<AMessage> &msg) {
}

status_t LiveSession::getDuration(int64_t *durationUs) const {
    int64_t maxDurationUs = 0ll;
    int64_t maxDurationUs = -1ll;
    for (size_t i = 0; i < mFetcherInfos.size(); ++i) {
        int64_t fetcherDurationUs = mFetcherInfos.valueAt(i).mDurationUs;

        if (fetcherDurationUs >= 0ll && fetcherDurationUs > maxDurationUs) {
        if (fetcherDurationUs > maxDurationUs) {
            maxDurationUs = fetcherDurationUs;
        }
    }