mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Fixed initializing cDvbPlayerControl and cTransferControl
This commit is contained in:
		| @@ -2203,6 +2203,7 @@ Marko M | ||||
|  for reporting a compiler warning about the use of strncpy() in strreplace() | ||||
|  for adding support for kernel based LIRC driver | ||||
|  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> | ||||
|  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. | ||||
| - 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<65>). | ||||
| - Fixed initializing cDvbPlayerControl and cTransferControl (reported by Marko M<>kel<65>). | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  * See the main source file 'vdr.c' for copyright information and | ||||
|  * 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" | ||||
| @@ -981,8 +981,10 @@ bool cDvbPlayer::GetReplayMode(bool &Play, bool &Forward, int &Speed) | ||||
| // --- cDvbPlayerControl ----------------------------------------------------- | ||||
|  | ||||
| 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() | ||||
|   | ||||
							
								
								
									
										3
									
								
								player.h
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								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.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 | ||||
| @@ -107,6 +107,7 @@ public: | ||||
|          ///< Deletion of the marks themselves is handled separately, calling | ||||
|          ///< this function merely tells the player to no longer display the | ||||
|          ///< marks, if it has any. | ||||
|   void SetPlayer(cPlayer *Player) { player = Player; } | ||||
|   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; } | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  * See the main source file 'vdr.c' for copyright information and | ||||
|  * 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" | ||||
| @@ -68,8 +68,10 @@ void cTransfer::Receive(const uchar *Data, int Length) | ||||
| cDevice *cTransferControl::receiverDevice = NULL; | ||||
|  | ||||
| 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 = ReceiverDevice; | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user