diff --git a/src/driver/record.cpp b/src/driver/record.cpp index 91a86c661..8492dc6bc 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -1125,7 +1125,7 @@ bool CRecordManager::StopAutoRecord(bool lock) g_RCInput->killTimer (shift_timer); - if(!autoshift) + if (!autoshift) return false; if (lock) @@ -1135,7 +1135,7 @@ bool CRecordManager::StopAutoRecord(bool lock) if (inst) { StopInstance(inst); - CMoviePlayerGui::getInstance().timeshift = TSHIFT_MODE_OFF; + CMoviePlayerGui::getInstance().stopTimeshift(); } if (lock) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 20a479e79..d87685169 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1253,6 +1253,16 @@ void CMoviePlayerGui::stopPlayBack(void) printf("%s: stopped\n", __func__); } +void CMoviePlayerGui::stopTimeshift(void) +{ + if (timeshift && playback) + { + printf("%s: stopping timeshift...\n", __func__); + playback->RequestAbort(); + timeshift = TSHIFT_MODE_OFF; + } +} + void CMoviePlayerGui::Pause(bool b) { if (b && (playstate == CMoviePlayerGui::PAUSE)) diff --git a/src/gui/movieplayer.h b/src/gui/movieplayer.h index 11a1ce813..3f4e2ae44 100644 --- a/src/gui/movieplayer.h +++ b/src/gui/movieplayer.h @@ -253,6 +253,7 @@ class CMoviePlayerGui : public CMenuTarget void SetFile(std::string &name, std::string &file, std::string info1="", std::string info2="") { pretty_name = name; file_name = file; info_1 = info1; info_2 = info2; } bool PlayBackgroundStart(const std::string &file, const std::string &name, t_channel_id chan, const std::string &script=""); void stopPlayBack(void); + void stopTimeshift(void); void setLastMode(int m) { m_LastMode = m; } void Pause(bool b = true); void selectAudioPid(void);