From 026daef8427078a7d9db4cfd436b77518e0e004b Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Fri, 12 May 2017 19:26:37 +0100 Subject: [PATCH] fixed input recorder crash --- libraries/controllers/src/controllers/InputRecorder.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/controllers/src/controllers/InputRecorder.cpp b/libraries/controllers/src/controllers/InputRecorder.cpp index 7433f181a1..c97bd99121 100644 --- a/libraries/controllers/src/controllers/InputRecorder.cpp +++ b/libraries/controllers/src/controllers/InputRecorder.cpp @@ -25,7 +25,7 @@ QString SAVE_DIRECTORY = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + "/" + BuildInfo::MODIFIED_ORGANIZATION + "/" + BuildInfo::INTERFACE_NAME + "/hifi-input-recordings/"; QString FILE_PREFIX_NAME = "input-recording-"; -QString COMPRESS_EXTENSION = ".tar.gz"; +QString COMPRESS_EXTENSION = ".gz"; namespace controller { QJsonObject poseToJsonObject(const Pose pose) { @@ -220,6 +220,7 @@ namespace controller { void InputRecorder::stopRecording() { _recording = false; + _framesRecorded = (int)_actionStateList.size(); } void InputRecorder::startPlayback() { @@ -282,7 +283,7 @@ namespace controller { if (_playback) { _playCount++; - if (_playCount == _framesRecorded) { + if (_playCount == (_framesRecorded - 1)) { _playCount = 0; } }