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

Commit ac5767a9 authored by Andreas Huber's avatar Andreas Huber
Browse files

Revert "Parse RTP-Info even for live streams."

This reverts commit d873413ff9f742f259c29d7d0b58265db6b24529.
parent 9906d2e2
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -301,9 +301,6 @@ void ASessionDescription::ParseFormatDesc(
// static
// static
bool ASessionDescription::parseNTPRange(
bool ASessionDescription::parseNTPRange(
        const char *s, float *npt1, float *npt2) {
        const char *s, float *npt1, float *npt2) {
    *npt1 = 0.0f;
    *npt2 = 0.0f;

    if (s[0] == '-') {
    if (s[0] == '-') {
        return false;  // no start time available.
        return false;  // no start time available.
    }
    }
+2 −4
Original line number Original line Diff line number Diff line
@@ -995,12 +995,10 @@ struct MyHandler : public AHandler {
        AString val;
        AString val;
        CHECK(GetAttribute(range.c_str(), "npt", &val));
        CHECK(GetAttribute(range.c_str(), "npt", &val));


        bool seekable = true;

        float npt1, npt2;
        float npt1, npt2;
        if (!ASessionDescription::parseNTPRange(val.c_str(), &npt1, &npt2)) {
        if (!ASessionDescription::parseNTPRange(val.c_str(), &npt1, &npt2)) {
            // This is a live stream and therefore not seekable.
            // This is a live stream and therefore not seekable.
            seekable = false;
            return;
        }
        }


        i = response->mHeaders.indexOfKey("rtp-info");
        i = response->mHeaders.indexOfKey("rtp-info");
@@ -1046,7 +1044,7 @@ struct MyHandler : public AHandler {
            ++n;
            ++n;
        }
        }


        mSeekable = seekable;
        mSeekable = true;
    }
    }


    sp<APacketSource> getPacketSource(size_t index) {
    sp<APacketSource> getPacketSource(size_t index) {