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

Commit e42ea051 authored by Byeongjo Park's avatar Byeongjo Park Committed by Automerger Merge Worker
Browse files

VT: fixes possible nullptr case in ARTPConnection. am: 5e3bd0f0 am: a13be709

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/av/+/15258902

Change-Id: If3096c4dd71774c173eeb29df6cfb3d8e4664a80
parents 7f8598ab a13be709
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -467,14 +467,16 @@ void ARTPConnection::onPollStreams() {

            if (err == -ECONNRESET) {
                // socket failure, this stream is dead, Jim.
                for (size_t i = 0; i < it->mSources.size(); ++i) {
                    sp<AMessage> notify = it->mNotifyMsg->dup();
                    notify->setInt32("rtcp-event", 1);
                    notify->setInt32("payload-type", 400);
                    notify->setInt32("feedback-type", 1);
                notify->setInt32("sender", it->mSources.valueAt(0)->getSelfID());
                    notify->setInt32("sender", it->mSources.valueAt(i)->getSelfID());
                    notify->post();

                    ALOGW("failed to receive RTP/RTCP datagram.");
                }
                it = mStreams.erase(it);
                continue;
            }