mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Fixed accessing a timer's event schedule in case the event has been removed from the schedule
This commit is contained in:
		
							
								
								
									
										4
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								HISTORY
									
									
									
									
									
								
							| @@ -10034,7 +10034,7 @@ Video Disk Recorder Revision History | ||||
|   (suggested by Stefan Hofmann). | ||||
| - Added vdrrootdir and incdir to vdr.pc (thanks to Stefan Hofmann). | ||||
|  | ||||
| 2024-12-05: | ||||
| 2025-01-07: | ||||
|  | ||||
| - Removed all DEPRECATED_* code. | ||||
| - Fixed error checking in case the fps value can't be determined by the frame parser. | ||||
| @@ -10045,3 +10045,5 @@ Video Disk Recorder Revision History | ||||
| - Added some missing locking. | ||||
| - TS packets with errors are now skipped when parsing for frames. | ||||
| - Fixed handling the fps value if it can't be determined from the video data. | ||||
| - Fixed accessing a timer's event schedule in case the event has been removed from the | ||||
|   schedule. | ||||
|   | ||||
							
								
								
									
										7
									
								
								timers.c
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								timers.c
									
									
									
									
									
								
							| @@ -4,7 +4,7 @@ | ||||
|  * See the main source file 'vdr.c' for copyright information and | ||||
|  * how to reach the author. | ||||
|  * | ||||
|  * $Id: timers.c 5.21 2024/10/11 13:58:11 kls Exp $ | ||||
|  * $Id: timers.c 5.22 2025/01/07 10:46:22 kls Exp $ | ||||
|  */ | ||||
|  | ||||
| #include "timers.h" | ||||
| @@ -620,7 +620,8 @@ bool cTimer::Matches(time_t t, bool Directly, int Margin) const | ||||
|                  startTime = event->StartTime(); | ||||
|                  stopTime = event->EndTime(); | ||||
|                  if (!Margin) { // this is an actual check | ||||
|                     if (event->Schedule()->PresentSeenWithin(EITPRESENTFOLLOWINGRATE)) { // VPS control can only work with up-to-date events... | ||||
|                     const cSchedule *Schedule = event->Schedule(); | ||||
|                     if (Schedule && Schedule->PresentSeenWithin(EITPRESENTFOLLOWINGRATE)) { // VPS control can only work with up-to-date events... | ||||
|                        if (!vpsActive) { | ||||
|                           vpsActive = true; | ||||
|                           if (Recording()) | ||||
| @@ -636,7 +637,7 @@ bool cTimer::Matches(time_t t, bool Directly, int Margin) const | ||||
|                        return running || time(NULL) < vpsNotRunning + VPSGRACE; | ||||
|                        } | ||||
|                     if (Recording()) { | ||||
|                        if (event->Schedule()->PresentSeenWithin(EITPRESENTFOLLOWINGGRACE)) | ||||
|                        if (Schedule && Schedule->PresentSeenWithin(EITPRESENTFOLLOWINGGRACE)) | ||||
|                           return event->IsRunning(true); // give it a chance to recover - worst case: the recording will be 60 seconds too long | ||||
|                        if (vpsActive) { | ||||
|                           vpsActive = false; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user