Stop invalid encoder output explicitly while preserving transient backpressure retries

This commit is contained in:
evgeny committed 2026-10-19 17:32:49 +02:00
1 parent c0422a73c0
commit 322947777c
3 files changed
+15 -6

No files matched your search

+5 -1
View File
@@ -307,7 +307,11 @@ void CallVideoEngine::transmit() {
m->report(QString("%1 · %2×%3 · %4 kbit/s").arg(format.codec == 2 ? "H.265" : "H.264")
.arg(format.width).arg(format.height).arg(encoder.bitrate() / 1000));
}
if (!encoded) { forceKey = true; m->report(encoder.error()); continue; }
if (!encoded) {
m->report(encoder.error());
std::lock_guard<std::mutex> guard(m->lock); m->enabled = false;
continue;
}
// GPU может вернуть несколько уже готовых кадров: отправляем все, не добавляя очередь в TX worker.
if (outputs.isEmpty()) { idle(); continue; }
if (outputs.size() > CALL_VIDEO_PORT_TX_FRAMES) {