From e87b54ecfe7e3a7c37ffa62cf206d34396e646af Mon Sep 17 00:00:00 2001 From: martii Date: Thu, 26 Sep 2013 14:47:17 +0200 Subject: [PATCH] gui/movieplayer: create and use a movieinfo copy (fixes timeshift playback) Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/87d5f4feb92ed1ecb880a5871cc17b802dcbed52 Author: martii Date: 2013-09-26 (Thu, 26 Sep 2013) --- src/gui/movieplayer.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 25e4b052f..8d9c44ffe 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -508,7 +508,13 @@ void CMoviePlayerGui::PlayFile(void) printf("IS FILE PLAYER: %s\n", is_file_player ? "true": "false" ); - if(p_movie_info != NULL) { + MI_MOVIE_INFO mi; + + if(p_movie_info) { + // p_movie_info may be invalidated by CRecordManager while we're still using it. Create and use a copy. + mi = *p_movie_info; + p_movie_info = &mi; + duration = p_movie_info->length * 60 * 1000; int percent = CZapit::getInstance()->GetPidVolume(p_movie_info->epgId, currentapid, currentac3 == 1); CZapit::getInstance()->SetVolumePercent(percent);