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."); |
+ } |
} |
} |