AppRTCDemo(Android): only stop the cameraThread's looper after stopping the camera.

R=glaznev@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/20569004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6358 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
fischman@webrtc.org 2014-06-06 21:22:37 +00:00
parent b464618c84
commit 171d94177b

View File

@ -219,7 +219,6 @@ public class VideoCaptureAndroid implements PreviewCallback, Callback {
private void stopCaptureOnCameraThread(
Exchanger<Boolean> result) {
Log.d(TAG, "stopCapture");
Looper.myLooper().quit();
if (camera == null) {
throw new RuntimeException("Camera is already stopped!");
}
@ -243,6 +242,7 @@ public class VideoCaptureAndroid implements PreviewCallback, Callback {
error = e;
}
Log.e(TAG, "Failed to stop camera", error);
Looper.myLooper().quit();
exchange(result, false);
return;
}