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

Commit 6b8f0cd3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix CodecLooper queue block issue" into main am: 1f4ed7f4

parents fe6d3c45 1f4ed7f4
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2333,10 +2333,13 @@ status_t CCodec::unsubscribeFromParameters(const std::vector<std::string> &names
void CCodec::onWorkDone(std::list<std::unique_ptr<C2Work>> &workItems) {
    if (!workItems.empty()) {
        Mutexed<std::list<std::unique_ptr<C2Work>>>::Locked queue(mWorkDoneQueue);
        bool shouldPost = queue->empty();
        queue->splice(queue->end(), workItems);
    }
        if (shouldPost) {
            (new AMessage(kWhatWorkDone, this))->post();
        }
    }
}

void CCodec::onInputBufferDone(uint64_t frameIndex, size_t arrayIndex) {
    mChannel->onInputBufferDone(frameIndex, arrayIndex);