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

Commit 4102de0a authored by Leena Winterrowd's avatar Leena Winterrowd Committed by Steve Kondik
Browse files

stagefright: httplive: Propagate target duration to LiveSession

LiveSession's switch-down monitor requires the 'targetDuration'
key to evaluate the switching threshold. Ensure that this key is
set in the access unit metadata.

CRs-Fixed: 759581
Change-Id: Ib30f3b4bd8185a77a06abd755822f96644968a21
parent bfc52120
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1142,6 +1142,11 @@ const sp<ABuffer> &PlaylistFetcher::setAccessUnitProperties(
        accessUnit->meta()->setInt32("discard", discard);
    }

    int32_t targetDurationSecs;
    if (mPlaylist->meta()->findInt32("target-duration", &targetDurationSecs)) {
        accessUnit->meta()->setInt32("targetDuration", targetDurationSecs);
    }

    accessUnit->meta()->setInt32("discontinuitySeq", mDiscontinuitySeq);
    accessUnit->meta()->setInt64("segmentStartTimeUs", getSegmentStartTimeUs(mSeqNumber));
    return accessUnit;