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
diff --git a/media/codec2/sfplugin/CCodecBufferChannel.cpp b/media/codec2/sfplugin/CCodecBufferChannel.cpp
index 66a9adf..5530d72 100644
--- a/media/codec2/sfplugin/CCodecBufferChannel.cpp
+++ b/media/codec2/sfplugin/CCodecBufferChannel.cpp
@@ -2940,7 +2940,7 @@
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);
}