diff --git a/src/plugins/screencast/screencaststream.cpp b/src/plugins/screencast/screencaststream.cpp index 30c65afd9d..023a2fe5b8 100644 --- a/src/plugins/screencast/screencaststream.cpp +++ b/src/plugins/screencast/screencaststream.cpp @@ -582,12 +582,7 @@ void ScreenCastStream::addHeader(spa_buffer *spaBuffer) spaHeader->flags = 0; spaHeader->dts_offset = 0; spaHeader->seq = m_sequential++; - - const auto timestamp = m_source->clock(); - if (!m_start) { - m_start = timestamp; - } - spaHeader->pts = (timestamp - m_start.value()).count(); + spaHeader->pts = m_source->clock().count(); } } diff --git a/src/plugins/screencast/screencaststream.h b/src/plugins/screencast/screencaststream.h index 4e892cc8cb..c751c04d00 100644 --- a/src/plugins/screencast/screencaststream.h +++ b/src/plugins/screencast/screencaststream.h @@ -128,7 +128,6 @@ private: pw_buffer *m_pendingBuffer = nullptr; std::unique_ptr m_pendingNotifier; std::unique_ptr m_pendingFence; - std::optional m_start; quint64 m_sequential = 0; bool m_hasDmaBuf = false; bool m_waitForNewBuffers = false;