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

Commit ce5ea119 authored by Wonsik Kim's avatar Wonsik Kim Committed by android-build-merger
Browse files

Merge "codec2: fix rare native crash in buffer queue thread" into qt-dev

am: d0fb5dc7

Change-Id: Ib7ee00a9cf842c5bd9c0027fbde78baa3fefbe5e
parents 19216177 d0fb5dc7
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -76,10 +76,11 @@ protected:
            Mutexed<Jobs>::Locked jobs(mJobs);
            nsecs_t nowNs = systemTime();
            bool queued = false;
            for (auto it = jobs->queues.begin(); it != jobs->queues.end(); ++it) {
            for (auto it = jobs->queues.begin(); it != jobs->queues.end(); ) {
                Queue &queue = it->second;
                if (queue.workList.empty()
                        || nowNs - queue.lastQueuedTimestampNs < kIntervalNs) {
                    ++it;
                    continue;
                }
                std::shared_ptr<Codec2Client::Component> comp = queue.component.lock();
@@ -109,6 +110,7 @@ protected:
                }
                jobs.lock();

                it = jobs->queues.upper_bound(comp);
                queued = true;
            }
            if (queued) {