mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed initializing cDvbPlayerControl and cTransferControl
This commit is contained in:
parent
c12c7378e9
commit
4336b55f4e
@ -2203,6 +2203,7 @@ Marko M
|
|||||||
for reporting a compiler warning about the use of strncpy() in strreplace()
|
for reporting a compiler warning about the use of strncpy() in strreplace()
|
||||||
for adding support for kernel based LIRC driver
|
for adding support for kernel based LIRC driver
|
||||||
for reporting a possible heap-use-after-free in cDvbTuner::Action()
|
for reporting a possible heap-use-after-free in cDvbTuner::Action()
|
||||||
|
for reporting a flaw in initializing cDvbPlayerControl and cTransferControl
|
||||||
|
|
||||||
Patrick Rother <krd-vdr@gulu.net>
|
Patrick Rother <krd-vdr@gulu.net>
|
||||||
for reporting a bug in defining timers that only differ in the day of week
|
for reporting a bug in defining timers that only differ in the day of week
|
||||||
|
1
HISTORY
1
HISTORY
@ -9823,3 +9823,4 @@ Video Disk Recorder Revision History
|
|||||||
- Fixed a faulty 'Timer still recording' query when canceling an editing job.
|
- Fixed a faulty 'Timer still recording' query when canceling an editing job.
|
||||||
- Added code for the 'qks' audio track (thanks to Johann Friedrichs).
|
- Added code for the 'qks' audio track (thanks to Johann Friedrichs).
|
||||||
- Fixed a possible heap-use-after-free in cDvbTuner::Action() (reported by Marko Mäkelä).
|
- Fixed a possible heap-use-after-free in cDvbTuner::Action() (reported by Marko Mäkelä).
|
||||||
|
- Fixed initializing cDvbPlayerControl and cTransferControl (reported by Marko Mäkelä).
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: dvbplayer.c 5.1 2022/01/13 21:41:41 kls Exp $
|
* $Id: dvbplayer.c 5.2 2022/12/05 14:45:51 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dvbplayer.h"
|
#include "dvbplayer.h"
|
||||||
@ -981,8 +981,10 @@ bool cDvbPlayer::GetReplayMode(bool &Play, bool &Forward, int &Speed)
|
|||||||
// --- cDvbPlayerControl -----------------------------------------------------
|
// --- cDvbPlayerControl -----------------------------------------------------
|
||||||
|
|
||||||
cDvbPlayerControl::cDvbPlayerControl(const char *FileName, bool PauseLive)
|
cDvbPlayerControl::cDvbPlayerControl(const char *FileName, bool PauseLive)
|
||||||
:cControl(player = new cDvbPlayer(FileName, PauseLive))
|
:cControl(NULL, PauseLive)
|
||||||
{
|
{
|
||||||
|
player = new cDvbPlayer(FileName, PauseLive);
|
||||||
|
SetPlayer(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
cDvbPlayerControl::~cDvbPlayerControl()
|
cDvbPlayerControl::~cDvbPlayerControl()
|
||||||
|
3
player.h
3
player.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: player.h 4.5 2020/05/18 16:47:29 kls Exp $
|
* $Id: player.h 5.1 2022/12/05 14:45:51 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __PLAYER_H
|
#ifndef __PLAYER_H
|
||||||
@ -107,6 +107,7 @@ public:
|
|||||||
///< Deletion of the marks themselves is handled separately, calling
|
///< Deletion of the marks themselves is handled separately, calling
|
||||||
///< this function merely tells the player to no longer display the
|
///< this function merely tells the player to no longer display the
|
||||||
///< marks, if it has any.
|
///< marks, if it has any.
|
||||||
|
void SetPlayer(cPlayer *Player) { player = Player; }
|
||||||
double FramesPerSecond(void) const { return player ? player->FramesPerSecond() : DEFAULTFRAMESPERSECOND; }
|
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 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 GetFrameNumber(int &Current, int &Total) const { return player ? player->GetFrameNumber(Current, Total) : false; }
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: transfer.c 4.2 2017/12/07 15:00:33 kls Exp $
|
* $Id: transfer.c 5.1 2022/12/05 14:45:51 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "transfer.h"
|
#include "transfer.h"
|
||||||
@ -68,8 +68,10 @@ void cTransfer::Receive(const uchar *Data, int Length)
|
|||||||
cDevice *cTransferControl::receiverDevice = NULL;
|
cDevice *cTransferControl::receiverDevice = NULL;
|
||||||
|
|
||||||
cTransferControl::cTransferControl(cDevice *ReceiverDevice, const cChannel *Channel)
|
cTransferControl::cTransferControl(cDevice *ReceiverDevice, const cChannel *Channel)
|
||||||
:cControl(transfer = new cTransfer(Channel), true)
|
:cControl(NULL, true)
|
||||||
{
|
{
|
||||||
|
transfer = new cTransfer(Channel);
|
||||||
|
SetPlayer(transfer);
|
||||||
ReceiverDevice->AttachReceiver(transfer);
|
ReceiverDevice->AttachReceiver(transfer);
|
||||||
receiverDevice = ReceiverDevice;
|
receiverDevice = ReceiverDevice;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user