Catch RuntimeException on Camera.setDisplayOrientation
Bug: webrtc:13032 Change-Id: I3736e61b8f49ae058851d7f5d60858454e5d5b09 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227287 Reviewed-by: Xavier Lepaul <xalep@webrtc.org> Commit-Queue: Xavier Lepaul <xalep@webrtc.org> Cr-Commit-Position: refs/heads/main@{#34853}
This commit is contained in:
parent
2ee0e64696
commit
0f549f908c
@ -104,7 +104,13 @@ class Camera1Session implements CameraSession {
|
||||
}
|
||||
|
||||
// Calculate orientation manually and send it as CVO insted.
|
||||
camera.setDisplayOrientation(0 /* degrees */);
|
||||
try {
|
||||
camera.setDisplayOrientation(0 /* degrees */);
|
||||
} catch (RuntimeException e) {
|
||||
camera.release();
|
||||
callback.onFailure(FailureType.ERROR, e.getMessage());
|
||||
return;
|
||||
}
|
||||
|
||||
callback.onDone(new Camera1Session(events, captureToTexture, applicationContext,
|
||||
surfaceTextureHelper, cameraId, camera, info, captureFormat, constructionTimeNs));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user