提交 48a8aefd 编写于 作者: A Andrey Pavlenko 提交者: OpenCV Buildbot

Merge pull request #854 from asmorkalov:android_null_invalid_cam

...@@ -53,14 +53,16 @@ public class NativeCameraView extends CameraBridgeViewBase { ...@@ -53,14 +53,16 @@ public class NativeCameraView extends CameraBridgeViewBase {
/* 1. We need to stop thread which updating the frames /* 1. We need to stop thread which updating the frames
* 2. Stop camera and release it * 2. Stop camera and release it
*/ */
try { if (mThread != null) {
mStopThread = true; try {
mThread.join(); mStopThread = true;
} catch (InterruptedException e) { mThread.join();
e.printStackTrace(); } catch (InterruptedException e) {
} finally { e.printStackTrace();
mThread = null; } finally {
mStopThread = false; mThread = null;
mStopThread = false;
}
} }
/* Now release camera */ /* Now release camera */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册