Commit a180cb68 by Kim Jinsung

THETAカメラ画面からTHETAライブラリ及びTHETAプレビューに遷移して戻った時は漏出調整できなくなる問題対応

parent 42a4ec5a
...@@ -119,9 +119,13 @@ public class MJpegView extends SurfaceView implements SurfaceHolder.Callback { ...@@ -119,9 +119,13 @@ public class MJpegView extends SurfaceView implements SurfaceHolder.Callback {
* @param source Source stream * @param source Source stream
*/ */
public void setSource(MJpegInputStream source) { public void setSource(MJpegInputStream source) {
if (source == null) { //mMJpegInputStreamのクローズ作業のため、現在スレッドをストップする。
stopPlay();
} else {
mMJpegInputStream = source; mMJpegInputStream = source;
play(); play();
} }
}
/** /**
* Get source stream for receiving motion JPEG * Get source stream for receiving motion JPEG
...@@ -239,6 +243,7 @@ public class MJpegView extends SurfaceView implements SurfaceHolder.Callback { ...@@ -239,6 +243,7 @@ public class MJpegView extends SurfaceView implements SurfaceHolder.Callback {
if (mMJpegInputStream != null) { if (mMJpegInputStream != null) {
try { try {
mMJpegInputStream.close(); mMJpegInputStream.close();
mMJpegInputStream = null;
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
Logger.e(TAG, "mMJpegInputStream IOException = " + e.toString()); Logger.e(TAG, "mMJpegInputStream IOException = " + e.toString());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment