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

Commit 061947f0 authored by Oscar Rydhé's avatar Oscar Rydhé Committed by Steve Kondik
Browse files

HLS: getDuration should return -1 for live streams

According to the MediaPlayer API documentation -1 should
be returned if the duration is not available. But for HLS 0
is returned. Change this.

Change-Id: Ib7704a94ac8dc104ceed4da4491f0d03cb8f4560
parent 97de37de
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1109,7 +1109,7 @@ 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;