From 04a3e6fb06377fc75eef805147e55f93877b3e86 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. PR #5415 --- .../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 84bda1ce..6a58d791 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 @@ public class SurfaceEncoder implements AsyncProcessor { boolean headerWritten = false; do { + capture.consumeReset(); // If a capture reset was requested, it is implicitly fulfilled capture.prepare(); Size size = capture.getSize(); if (!headerWritten) {