Respect GPU pipeline capacity before submitting a new camera frame

This commit is contained in:
evgeny committed 2026-10-19 17:43:45 +02:00
1 parent 0f22be6885
commit d266c5da25
1 file changed
+1 -1
+1 -1
View File
@@ -282,7 +282,7 @@ void CallVideoEngine::transmit() {
call_video_port_applied(m->id, format.generation, request, 0);
}
#ifdef HAVE_STREAM_CAPTURE
bool submit = state.can_encode && pts > lastPts;
bool submit = state.can_encode && pts > lastPts && encoder.pendingFrames() < 8;
if (submit && (image.isNull() || nowUs() - pts > CallCameraMaxFrameAgeUs)) {
DEBUG_WARN(DEBUG_CATEGORY_CALL, "video TX skips old capture age_us=%lld", (long long)(nowUs() - pts));
lastPts = pts; ++expired; continue;