Reset pendingCameraSwitch as false after failed to post switchCameraOnThread to camera thread.
BUG=webrtc:6981 Review-Url: https://codereview.webrtc.org/2625133007 Cr-Commit-Position: refs/heads/master@{#16105}
This commit is contained in:
committed by
Commit bot
parent
f4caaab518
commit
9506e12eba
@ -184,8 +184,13 @@ public class VideoCapturerAndroid
|
||||
}
|
||||
}
|
||||
});
|
||||
if (!didPost && switchEventsHandler != null) {
|
||||
switchEventsHandler.onCameraSwitchError("Camera is stopped.");
|
||||
if (!didPost) {
|
||||
synchronized (pendingCameraSwitchLock) {
|
||||
pendingCameraSwitch = false;
|
||||
}
|
||||
if (switchEventsHandler != null) {
|
||||
switchEventsHandler.onCameraSwitchError("Camera is stopped.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user