diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2017-11-26 15:02:54 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2017-11-26 15:02:54 +0100 |
commit | a9d82331e63353e92a3673670de9007a9c93dc39 (patch) | |
tree | 6073abd6bf604cf26d688c370c18ef02b7da4626 /player.h | |
parent | 8dcff164fa3374fa88263d6b11b33fa48d30dade (diff) | |
download | vdr-a9d82331e63353e92a3673670de9007a9c93dc39.tar.gz vdr-a9d82331e63353e92a3673670de9007a9c93dc39.tar.bz2 |
Fixed a possible crash with plugins that retrieve player information after a replay has been stopped, but before the replay control has been destroyed
Diffstat (limited to 'player.h')
-rw-r--r-- | player.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: player.h 4.2 2016/12/22 10:38:11 kls Exp $ + * $Id: player.h 4.3 2017/11/26 14:29:12 kls Exp $ */ #ifndef __PLAYER_H @@ -102,10 +102,10 @@ public: ///< skins as a last resort, in case they want to display the state of the ///< current player. The return value is expected to be a short, single line ///< string. The default implementation returns an empty string. - double FramesPerSecond(void) const { return player->FramesPerSecond(); } - bool GetIndex(int &Current, int &Total, bool SnapToIFrame = false) const { return player->GetIndex(Current, Total, SnapToIFrame); } - bool GetFrameNumber(int &Current, int &Total) const { return player->GetFrameNumber(Current, Total); } - bool GetReplayMode(bool &Play, bool &Forward, int &Speed) const { return player->GetReplayMode(Play, Forward, Speed); } + double FramesPerSecond(void) const { return player ? player->FramesPerSecond() : DEFAULTFRAMESPERSECOND; } + bool GetIndex(int &Current, int &Total, bool SnapToIFrame = false) const { return player ? player->GetIndex(Current, Total, SnapToIFrame) : false; } + bool GetFrameNumber(int &Current, int &Total) const { return player ? player->GetFrameNumber(Current, Total) : false; } + bool GetReplayMode(bool &Play, bool &Forward, int &Speed) const { return player ? player->GetReplayMode(Play, Forward, Speed) : false; } static void Launch(cControl *Control); static void Attach(void); static void Shutdown(void); |