From a42a0ad77aaa71acc8aa5838f459cf23bec3afde Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Mon, 28 Oct 2024 18:30:52 +0100 Subject: [PATCH] Consume reset request on encoding start If a reset request is pending when a new encoding starts, then it is implicitly fulfilled. --- .../main/java/com/genymobile/scrcpy/video/SurfaceEncoder.java | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/main/java/com/genymobile/scrcpy/video/SurfaceEncoder.java b/server/src/main/java/com/genymobile/scrcpy/video/SurfaceEncoder.java index 84bda1ce82..6a58d791cf 100644 --- a/server/src/main/java/com/genymobile/scrcpy/video/SurfaceEncoder.java +++ b/server/src/main/java/com/genymobile/scrcpy/video/SurfaceEncoder.java @@ -72,6 +72,7 @@ private void streamCapture() throws IOException, ConfigurationException { boolean headerWritten = false; do { + capture.consumeReset(); // If a capture reset was requested, it is implicitly fulfilled capture.prepare(); Size size = capture.getSize(); if (!headerWritten) {