From 4a4397ace139206a16298063ecc58e88591f4b60 Mon Sep 17 00:00:00 2001 From: evgeny Date: Wed, 14 Oct 2026 10:20:50 +0200 Subject: [PATCH] Start portal encoder deadlines after the first permitted capture frame --- tools/chatgui/src/stream_publish_engine.cpp | 1 + tools/chatgui/tests/test_stream_publish.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/tools/chatgui/src/stream_publish_engine.cpp b/tools/chatgui/src/stream_publish_engine.cpp index b84ba8b3..4ac33dd7 100644 --- a/tools/chatgui/src/stream_publish_engine.cpp +++ b/tools/chatgui/src/stream_publish_engine.cpp @@ -131,6 +131,7 @@ bool StreamPublishEngine::openSource(const StreamPublishConfig& config) { m->backendAnchor = now; DEBUG_WARN(DEBUG_CATEGORY_VIDEO, "desktop capture has no source PTS; using monotonic callback estimate"); } + if (m->framePts < 0 && m->wanted.source.id == "portal") m->started = monotonicUs(); m->frame = m->previewFrame = frame; m->framePts = std::max(1, now - m->origin); m->frameGeneration = m->generation; m->wake.notify_all(); }, Qt::DirectConnection); diff --git a/tools/chatgui/tests/test_stream_publish.cpp b/tools/chatgui/tests/test_stream_publish.cpp index 96ae4c97..90fb533f 100644 --- a/tools/chatgui/tests/test_stream_publish.cpp +++ b/tools/chatgui/tests/test_stream_publish.cpp @@ -17,6 +17,7 @@ extern "C" { #include "u_async.h" #include "chat/chat_core.h" #include "stream/stream.h" +#include "stream/stream_member.h" #include "debug_config.h" #include "mem.h" #include "sqlite3.h"