diff --git a/mythtv/libs/libmythtv/mythplayer.cpp b/mythtv/libs/libmythtv/mythplayer.cpp
index ba516025017..5488781d6bd 100644
a
|
b
|
MythPlayer::MythPlayer(PlayerFlags flags) |
202 | 202 | frame_interval((int)(1000000.0f / 30)), m_frame_interval(0), |
203 | 203 | m_fpsMultiplier(1), |
204 | 204 | ffrew_skip(1),ffrew_adjust(0), |
| 205 | fileChanged(false), |
205 | 206 | // Audio and video synchronization stuff |
206 | 207 | videosync(nullptr), avsync_delay(0), |
207 | 208 | avsync_adjustment(0), avsync_avg(0), |
… |
… |
void MythPlayer::SwitchToProgram(void) |
3055 | 3056 | LOG(VB_PLAYBACK, LOG_INFO, LOC + "SwitchToProgram - end"); |
3056 | 3057 | } |
3057 | 3058 | |
| 3059 | // This is called from decoder thread. Set an indicator that will |
| 3060 | // be checked and actioned in the player thread. |
3058 | 3061 | void MythPlayer::FileChangedCallback(void) |
3059 | 3062 | { |
3060 | 3063 | LOG(VB_PLAYBACK, LOG_INFO, LOC + "FileChangedCallback"); |
| 3064 | fileChanged = true; |
| 3065 | } |
| 3066 | |
| 3067 | // Called from the player thread. |
| 3068 | void MythPlayer::FileChanged(void) |
| 3069 | { |
| 3070 | fileChanged = false; |
| 3071 | LOG(VB_PLAYBACK, LOG_INFO, LOC + "FileChanged"); |
3061 | 3072 | |
3062 | 3073 | Pause(); |
3063 | 3074 | ChangeSpeed(); |
… |
… |
void MythPlayer::FileChangedCallback(void) |
3080 | 3091 | forcePositionMapSync = true; |
3081 | 3092 | } |
3082 | 3093 | |
| 3094 | |
| 3095 | |
| 3096 | |
3083 | 3097 | void MythPlayer::JumpToProgram(void) |
3084 | 3098 | { |
3085 | 3099 | LOG(VB_PLAYBACK, LOG_INFO, LOC + "JumpToProgram - start"); |
… |
… |
void MythPlayer::EventStart(void) |
3295 | 3309 | |
3296 | 3310 | void MythPlayer::EventLoop(void) |
3297 | 3311 | { |
| 3312 | // Live TV program change |
| 3313 | if (fileChanged) |
| 3314 | FileChanged(); |
| 3315 | |
3298 | 3316 | // recreate the osd if a reinit was triggered by another thread |
3299 | 3317 | if (reinit_osd) |
3300 | 3318 | ReinitOSD(); |
diff --git a/mythtv/libs/libmythtv/mythplayer.h b/mythtv/libs/libmythtv/mythplayer.h
index c80d9ecb677..68371ea729f 100644
a
|
b
|
class MTV_PUBLIC MythPlayer |
393 | 393 | FrameScanType GetScanType(void) const { return m_scan; } |
394 | 394 | bool IsScanTypeLocked(void) const { return m_scan_locked; } |
395 | 395 | void Zoom(ZoomDirection direction); |
| 396 | void FileChanged(void); |
| 397 | |
396 | 398 | |
397 | 399 | // Windowing stuff |
398 | 400 | void EmbedInWidget(QRect rect); |
… |
… |
class MTV_PUBLIC MythPlayer |
818 | 820 | |
819 | 821 | int ffrew_skip; |
820 | 822 | int ffrew_adjust; |
| 823 | bool fileChanged; |
821 | 824 | |
822 | 825 | // Audio and video synchronization stuff |
823 | 826 | VideoSync *videosync; |