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,10 +184,15 @@ public class VideoCapturerAndroid
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!didPost && switchEventsHandler != null) {
|
if (!didPost) {
|
||||||
|
synchronized (pendingCameraSwitchLock) {
|
||||||
|
pendingCameraSwitch = false;
|
||||||
|
}
|
||||||
|
if (switchEventsHandler != null) {
|
||||||
switchEventsHandler.onCameraSwitchError("Camera is stopped.");
|
switchEventsHandler.onCameraSwitchError("Camera is stopped.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Reconfigure the camera to capture in a new format. This should only be called while the camera
|
// Reconfigure the camera to capture in a new format. This should only be called while the camera
|
||||||
// is running.
|
// is running.
|
||||||
|
|||||||
Reference in New Issue
Block a user