mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-04-19 19:15:08 +00:00
Retry capture on IOException
If the capture fails with an IOException, retry with a lower resolution. Fixes #5539 <https://github.com/Genymobile/scrcpy/issues/5539>
This commit is contained in:
parent
aea6a371aa
commit
9555d3a537
1 changed files with 2 additions and 2 deletions
|
@ -112,8 +112,8 @@ public class SurfaceEncoder implements AsyncProcessor {
|
|||
// The capture might have been closed internally (for example if the camera is disconnected)
|
||||
alive = !stopped.get() && !capture.isClosed();
|
||||
}
|
||||
} catch (IllegalStateException | IllegalArgumentException e) {
|
||||
Ln.e("Encoding error: " + e.getClass().getName() + ": " + e.getMessage());
|
||||
} catch (IllegalStateException | IllegalArgumentException | IOException e) {
|
||||
Ln.e("Capture/encoding error: " + e.getClass().getName() + ": " + e.getMessage());
|
||||
if (!prepareRetry(size)) {
|
||||
throw e;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue