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

Commit d0fb5dc7 authored by Wonsik Kim's avatar Wonsik Kim Committed by Android (Google) Code Review
Browse files

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

parents 9368cad3 0ca30c33
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) {