Android VideoCapturerAndroid: Move stopListening() call to stopCaptureOnCameraThread()
switchCamera() only calls stopCaptureOnCameraThread(), not stopCapture(), so the stopListening() call must be placed there. BUG=webrtc:5519,b/27497950 R=perkj@webrtc.org Review URL: https://codereview.webrtc.org/1770423002 . Cr-Commit-Position: refs/heads/master@{#11917}
This commit is contained in:
@ -544,8 +544,6 @@ public class VideoCapturerAndroid implements
|
||||
final CountDownLatch barrier = new CountDownLatch(1);
|
||||
cameraThreadHandler.post(new Runnable() {
|
||||
@Override public void run() {
|
||||
// Make sure onTextureFrameAvailable() is not called anymore.
|
||||
surfaceHelper.stopListening();
|
||||
stopCaptureOnCameraThread();
|
||||
barrier.countDown();
|
||||
}
|
||||
@ -566,6 +564,8 @@ public class VideoCapturerAndroid implements
|
||||
return;
|
||||
}
|
||||
|
||||
// Make sure onTextureFrameAvailable() is not called anymore.
|
||||
surfaceHelper.stopListening();
|
||||
cameraThreadHandler.removeCallbacks(cameraObserver);
|
||||
cameraStatistics.getAndResetFrameCount();
|
||||
Logging.d(TAG, "Stop preview.");
|
||||
|
||||
Reference in New Issue
Block a user