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
@ -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…
x
Reference in New Issue
Block a user