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

Unverified Commit a5b141dc authored by Jiajia Cong's avatar Jiajia Cong Committed by Michael Bestas
Browse files

codec2: add smoothfactor when checking n-th work

pipeline watcher's queued work counter included smoothfactor, if we
don't add it in elapsed(), it is easy to cause CCodec queue call timeout

CRs-Fixed: 2984012
Test: Verified on OnePlus 9 that YouTube video does
      not unpause itself.
Change-Id: Ia2dbf3a7cf0da4805398cf44780ad3dacbaf1a1b
parent 0aa46a95
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2346,7 +2346,7 @@ PipelineWatcher::Clock::duration CCodecBufferChannel::elapsed() {
    size_t outputDelay = mOutput.lock()->outputDelay;
    {
        Mutexed<Input>::Locked input(mInput);
        n = input->inputDelay + input->pipelineDelay + outputDelay;
        n = input->inputDelay + input->pipelineDelay + outputDelay + kSmoothnessFactor;
    }
    return mPipelineWatcher.lock()->elapsed(PipelineWatcher::Clock::now(), n);
}