Consume reset request on encoding start

If a reset request is pending when a new encoding starts, then it is
implicitly fulfilled.

PR #5415 <https://github.com/Genymobile/scrcpy/pull/5415>
This commit is contained in:
Romain Vimont 2024-10-28 18:30:52 +01:00
parent c29ecd0314
commit 04a3e6fb06
1 changed files with 1 additions and 0 deletions

View File

@ -72,6 +72,7 @@ public class SurfaceEncoder implements AsyncProcessor {
boolean headerWritten = false; boolean headerWritten = false;
do { do {
capture.consumeReset(); // If a capture reset was requested, it is implicitly fulfilled
capture.prepare(); capture.prepare();
Size size = capture.getSize(); Size size = capture.getSize();
if (!headerWritten) { if (!headerWritten) {