Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1227)

Unified Diff: webrtc/sdk/android/api/org/webrtc/VideoCapturerAndroid.java

Issue 2625133007: Reset pendingCameraSwitch as false after failed to post switchCameraOnThread to camera thread. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/sdk/android/api/org/webrtc/VideoCapturerAndroid.java
diff --git a/webrtc/sdk/android/api/org/webrtc/VideoCapturerAndroid.java b/webrtc/sdk/android/api/org/webrtc/VideoCapturerAndroid.java
index 45a5fcbda3817b4a3499ffe3bca474e30f6b3022..d002925215f5f40689e4b7ff0cb731c4a199e773 100644
--- a/webrtc/sdk/android/api/org/webrtc/VideoCapturerAndroid.java
+++ b/webrtc/sdk/android/api/org/webrtc/VideoCapturerAndroid.java
@@ -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.");
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698