Skip to content

Commit

Permalink
Retry capture on IOException
Browse files Browse the repository at this point in the history
If the capture fails with an IOException, retry with a lower resolution.

Fixes #5539 <#5539>
  • Loading branch information
rom1v committed Dec 3, 2024
1 parent aea6a37 commit 9555d3a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ private void streamCapture() throws IOException, ConfigurationException {
// 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;
}
Expand Down

0 comments on commit 9555d3a

Please sign in to comment.