diff options
| author | Vaxry <vaxry@vaxry.net> | 2025-01-28 23:43:26 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2025-01-28 23:43:31 +0000 |
| commit | 3d1dd6b5c7b90e513e86c1ad27c6c01a5c69e4f8 (patch) | |
| tree | 661d10cb7b77bf3a4acdbc5d905e639a2620f9e5 /src/protocols/PresentationTime.cpp | |
| parent | 1d3904c3e7a8b74ea83669f73ee408bd38390b11 (diff) | |
presentation: log a fixme when there is a feedback leak
ref #8087
Diffstat (limited to 'src/protocols/PresentationTime.cpp')
| -rw-r--r-- | src/protocols/PresentationTime.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/protocols/PresentationTime.cpp b/src/protocols/PresentationTime.cpp index a9139ac0..05fda8ea 100644 --- a/src/protocols/PresentationTime.cpp +++ b/src/protocols/PresentationTime.cpp @@ -130,6 +130,11 @@ void CPresentationProtocol::onPresented(PHLMONITOR pMonitor, timespec* when, uin } } + if (m_vFeedbacks.size() > 10000 /* arbitrary number I chose as fitting */) { + LOGM(ERR, "FIXME: presentation has a feedback leak, and has grown to {} pending entries!!! Dropping!!!!!", m_vFeedbacks.size()); + m_vFeedbacks = {m_vFeedbacks.begin() + 9000, m_vFeedbacks.end()}; + } + std::erase_if(m_vFeedbacks, [](const auto& other) { return !other->surface || other->done; }); std::erase_if(m_vQueue, [pMonitor](const auto& other) { return !other->surface || other->pMonitor == pMonitor || !other->pMonitor || other->done; }); } |
