diff --git a/app/src/main/java/net/sourceforge/opencamera/preview/Preview.java b/app/src/main/java/net/sourceforge/opencamera/preview/Preview.java index 1ca31b30..42acb8ed 100644 --- a/app/src/main/java/net/sourceforge/opencamera/preview/Preview.java +++ b/app/src/main/java/net/sourceforge/opencamera/preview/Preview.java @@ -963,6 +963,7 @@ private void configureTransform() { } private void stopVideoPostPrepare(boolean from_restart) { + applicationInterface.stoppingVideo(); Log.d(TAG, "Stopping video post prepare"); if( video_recorder != null ) { // check again, just to be safe @@ -1004,7 +1005,7 @@ private void stopVideoPostPrepare(boolean from_restart) { @TargetApi(Build.VERSION_CODES.LOLLIPOP) public void stopVideo(boolean from_restart) { - applicationInterface.stoppingVideo(); + camera_controller.closeVideoRecordingSession(); if( MyDebug.LOG ) Log.d(TAG, "stopVideo()"); @@ -1032,8 +1033,6 @@ public void stopVideo(boolean from_restart) { } - camera_controller.closeVideoRecordingSession(); - /* If camera2api is not used, we should stop video immediately. Otherwise it is done in callback after captureSession is closed