Index: vdr-2.6.6_sik/epg.c
===================================================================
--- vdr-2.6.6_sik.orig/epg.c	2024-02-10 09:54:42.558273824 +0100
+++ vdr-2.6.6_sik/epg.c	2024-02-10 09:54:42.546273946 +0100
@@ -18,6 +18,7 @@
 
 #define RUNNINGSTATUSTIMEOUT 30 // seconds before the running status is considered unknown
 #define EPGDATAWRITEDELTA   600 // seconds between writing the epg.data file
+#define VPSGRACE 15             // seconds we still record after changing the running status to stop
 
 // --- tComponent ------------------------------------------------------------
 
@@ -120,6 +121,7 @@
   tableID = 0xFF; // actual table ids are 0x4E..0x60
   version = 0xFF; // actual version numbers are 0..31
   runningStatus = SI::RunningStatusUndefined;
+  timeRunningStatusChangedToNotRunning = 0;
   title = NULL;
   shortText = NULL;
   description = NULL;
@@ -176,8 +178,14 @@
 
 void cEvent::SetRunningStatus(int RunningStatus, const cChannel *Channel)
 {
+  if (runningStatus == RunningStatus) return;
   if (Channel && runningStatus != RunningStatus && (RunningStatus > SI::RunningStatusNotRunning || runningStatus > SI::RunningStatusUndefined) && schedule && schedule->HasTimer())
-     isyslog("channel %d (%s) event %s status %d", Channel->Number(), Channel->Name(), *ToDescr(), RunningStatus);
+     isyslog("channel %d (%s) event %s old status %d status %d", Channel->Number(), Channel->Name(), *ToDescr(), runningStatus, RunningStatus);
+  if (runningStatus >= SI::RunningStatusStartsInAFewSeconds && RunningStatus < SI::RunningStatusStartsInAFewSeconds) {
+    timeRunningStatusChangedToNotRunning = time(NULL);
+  } else {
+    timeRunningStatusChangedToNotRunning = 0;
+  }
   runningStatus = RunningStatus;
 }
 
@@ -273,6 +281,7 @@
 
 bool cEvent::IsRunning(bool OrAboutToStart) const
 {
+  if (time(NULL) < timeRunningStatusChangedToNotRunning + VPSGRACE) return true;
   return runningStatus >= (OrAboutToStart ? SI::RunningStatusStartsInAFewSeconds : SI::RunningStatusPausing);
 }
 
Index: vdr-2.6.6_sik/epg.h
===================================================================
--- vdr-2.6.6_sik.orig/epg.h	2024-02-10 09:54:42.558273824 +0100
+++ vdr-2.6.6_sik/epg.h	2024-02-10 09:54:42.546273946 +0100
@@ -81,6 +81,7 @@
   uchar tableID;           // Table ID this event came from
   uchar version;           // Version number of section this event came from
   uchar runningStatus;     // 0=undefined, 1=not running, 2=starts in a few seconds, 3=pausing, 4=running
+  time_t timeRunningStatusChangedToNotRunning;
   uchar parentalRating;    // Parental rating of this event
   char *title;             // Title of this event
   char *shortText;         // Short description of this event (typically the episode name in case of a series)
