Commit a180cb68 by Kim Jinsung

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

parent 42a4ec5a
...@@ -119,8 +119,12 @@ public class MJpegView extends SurfaceView implements SurfaceHolder.Callback { ...@@ -119,8 +119,12 @@ 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) {
mMJpegInputStream = source; if (source == null) { //mMJpegInputStreamのクローズ作業のため、現在スレッドをストップする。
play(); stopPlay();
} else {
mMJpegInputStream = source;
play();
}
} }
/** /**
...@@ -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