mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed a possible crash with plugins that retrieve player information after a replay has been stopped, but before the replay control has been destroyed
This commit is contained in:
parent
8dcff164fa
commit
a9d82331e6
@ -2840,6 +2840,8 @@ Johann Friedrichs <johann.friedrichs@web.de>
|
||||
for fixing handling VPS events outside the LingerLimit, which could cause recordings to
|
||||
stop prematurely
|
||||
for fixing handling timers during the change from DST to winter time
|
||||
for fixing a possible crash with plugins that retrieve player information after a
|
||||
replay has been stopped, but before the replay control has been destroyed
|
||||
|
||||
Timo Helkio <timolavi@mbnet.fi>
|
||||
for reporting a hangup when replaying a TS recording with subtitles activated
|
||||
|
6
HISTORY
6
HISTORY
@ -9162,7 +9162,7 @@ Video Disk Recorder Revision History
|
||||
a subdirectory.
|
||||
- SVDRP peering can now be limited to the default SVDRP host (see MANUAL for details).
|
||||
|
||||
2017-11-12: Version 2.3.9
|
||||
2017-11-26: Version 2.3.9
|
||||
|
||||
- Updated the Italian OSD texts (thanks to Diego Pierotto).
|
||||
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
|
||||
@ -9201,3 +9201,7 @@ Video Disk Recorder Revision History
|
||||
- Added some comments regarding font height (thanks to Thomas Reufer).
|
||||
- Fixed handling timers during the change from DST to winter time (thanks to Johann
|
||||
Friedrichs).
|
||||
- Added missing checks of 'player' in member functions of cControl, and setting
|
||||
cControl::player to NULL in cDvbPlayerControl::Stop() to avoid a possible crash
|
||||
with plugins that retrieve player information after a replay has been stopped, but
|
||||
before the replay control has been destroyed (thanks to Johann Friedrich).
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: dvbplayer.c 4.4 2016/12/22 11:34:31 kls Exp $
|
||||
* $Id: dvbplayer.c 4.5 2017/11/26 14:55:03 kls Exp $
|
||||
*/
|
||||
|
||||
#include "dvbplayer.h"
|
||||
@ -1003,6 +1003,7 @@ bool cDvbPlayerControl::Active(void)
|
||||
|
||||
void cDvbPlayerControl::Stop(void)
|
||||
{
|
||||
cControl::player = NULL;
|
||||
delete player;
|
||||
player = NULL;
|
||||
}
|
||||
|
10
player.h
10
player.h
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user