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

Commit 9c459530 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 7703367 from 2a8ba1d3 to sc-v2-release

Change-Id: Ie7390facb34a6d460d6fb0c747ec77667b569132
parents 497f3fbd 2a8ba1d3
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -248,7 +248,10 @@ public:

        // align width and height to support subsampling cleanly
        uint32_t stride = align(view.crop().width, 2) * divUp(layout.planes[0].allocatedDepth, 8u);
        uint32_t vStride = align(view.crop().height, 2);

        int32_t fmtHeight = mHeight;
        format->findInt32(KEY_HEIGHT, &fmtHeight);
        uint32_t vStride = align(fmtHeight, 2);

        bool tryWrapping = !copy;

+12 −5
Original line number Diff line number Diff line
@@ -508,8 +508,6 @@ void ARTPConnection::onPollStreams() {
                    if (n != (ssize_t)buffer->size()) {
                        ALOGW("failed to send RTCP TMMBR (%s).",
                                n >= 0 ? "connection gone" : strerror(errno));

                        it = mStreams.erase(it);
                        continue;
                    }
                }
@@ -560,8 +558,6 @@ void ARTPConnection::onPollStreams() {
                if (n != (ssize_t)buffer->size()) {
                    ALOGW("failed to send RTCP receiver report (%s).",
                            n >= 0 ? "connection gone" : strerror(errno));

                    it = mStreams.erase(it);
                    continue;
                }

@@ -621,8 +617,15 @@ status_t ARTPConnection::receive(StreamInfo *s, bool receiveRTP) {
    } while (nbytes < 0 && errno == EINTR);

    if (nbytes <= 0) {
        ALOGW("failed to recv rtp packet. cause=%s", strerror(errno));
        // ECONNREFUSED may happen in next recvfrom() calling if one of
        // outgoing packet can not be delivered to remote by using sendto()
        if (errno == ECONNREFUSED) {
            return -ECONNREFUSED;
        } else {
            return -ECONNRESET;
        }
    }

    buffer->setRange(0, nbytes);

@@ -665,6 +668,10 @@ ssize_t ARTPConnection::send(const StreamInfo *info, const sp<ABuffer> buffer) {
                    pRemoteRTCPAddr, sizeSockSt);
        } while (n < 0 && errno == EINTR);

        if (n < 0) {
            ALOGW("failed to send rtcp packet. cause=%s", strerror(errno));
        }

        return n;
}