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

Commit 69686c47 authored by Andreas Huber's avatar Andreas Huber Committed by Android Git Automerger
Browse files

am d1ba051a: DO NOT MERGE: Work around several issues with non-compliant RTSP servers.

* commit 'd1ba051a465518fa4325c364ed77025fc1a2a794':
  DO NOT MERGE: Work around several issues with non-compliant RTSP servers.
parents e26308ad 3d7b550b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ AMPEG4ElementaryAssembler::AMPEG4ElementaryAssembler(
      mNextExpectedSeqNoValid(false),
      mNextExpectedSeqNo(0),
      mAccessUnitDamaged(false) {
    mIsGeneric = desc.startsWith("mpeg4-generic/");
    mIsGeneric = !strncasecmp(desc.c_str(),"mpeg4-generic/", 14);

    if (mIsGeneric) {
        AString value;
+1 −1
Original line number Diff line number Diff line
@@ -627,7 +627,7 @@ APacketSource::APacketSource(

        mFormat->setInt32(kKeyWidth, width);
        mFormat->setInt32(kKeyHeight, height);
    } else if (!strncmp(desc.c_str(), "mpeg4-generic/", 14)) {
    } else if (!strncasecmp(desc.c_str(), "mpeg4-generic/", 14)) {
        AString val;
        if (!GetAttribute(params.c_str(), "mode", &val)
                || (strcasecmp(val.c_str(), "AAC-lbr")
+3 −1
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ void ARTPConnection::MakePortPair(
        struct sockaddr_in addr;
        memset(addr.sin_zero, 0, sizeof(addr.sin_zero));
        addr.sin_family = AF_INET;
        addr.sin_addr.s_addr = INADDR_ANY;
        addr.sin_addr.s_addr = htonl(INADDR_ANY);
        addr.sin_port = htons(port);

        if (bind(*rtpSocket,
@@ -346,6 +346,8 @@ void ARTPConnection::onPollStreams() {
}

status_t ARTPConnection::receive(StreamInfo *s, bool receiveRTP) {
    LOGV("receiving %s", receiveRTP ? "RTP" : "RTCP");

    CHECK(!s->mIsInjected);

    sp<ABuffer> buffer = new ABuffer(65536);
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ ARTPSource::ARTPSource(
    } else  if (!strncmp(desc.c_str(), "AMR-WB/", 7)) {
        mAssembler = new AAMRAssembler(notify, true /* isWide */, params);
    } else if (!strncmp(desc.c_str(), "MP4V-ES/", 8)
            || !strncmp(desc.c_str(), "mpeg4-generic/", 14)) {
            || !strncasecmp(desc.c_str(), "mpeg4-generic/", 14)) {
        mAssembler = new AMPEG4ElementaryAssembler(notify, desc, params);
        mIssueFIRRequests = true;
    } else {
+5 −0
Original line number Diff line number Diff line
@@ -71,6 +71,11 @@ bool ASessionDescription::parse(const void *data, size_t size) {
            line.setTo(desc, i, eolPos - i);
        }

        if (line.empty()) {
            i = eolPos + 1;
            continue;
        }

        if (line.size() < 2 || line.c_str()[1] != '=') {
            return false;
        }
Loading