summaryrefslogtreecommitdiff
path: root/eit.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2017-05-03 09:02:24 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2017-05-03 09:02:24 +0200
commit79b57feab6babc566fca72a7ae8a889d7758651a (patch)
treea03a55e7af0c73d4bf257d39f4e7c980f9340043 /eit.c
parent1a92ae77a067454437595dd292d08d8dd2e17879 (diff)
downloadvdr-79b57feab6babc566fca72a7ae8a889d7758651a.tar.gz
vdr-79b57feab6babc566fca72a7ae8a889d7758651a.tar.bz2
Events in the EIT that end before the EPG linger time are now ignored in the incoming data stream
Diffstat (limited to 'eit.c')
-rw-r--r--eit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/eit.c b/eit.c
index cfed4d08..ade79286 100644
--- a/eit.c
+++ b/eit.c
@@ -8,7 +8,7 @@
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
* Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@gmx.de>.
*
- * $Id: eit.c 4.2 2017/03/31 15:16:46 kls Exp $
+ * $Id: eit.c 4.3 2017/05/03 08:58:41 kls Exp $
*/
#include "eit.h"
@@ -79,6 +79,7 @@ cEIT::cEIT(cSectionSyncerHash &SectionSyncerHash, int Source, u_char Tid, const
bool Empty = true;
bool Modified = false;
+ time_t LingerLimit = Now - Setup.EPGLinger * 60;
time_t SegmentStart = 0;
time_t SegmentEnd = 0;
struct tm t = { 0 };
@@ -93,6 +94,9 @@ cEIT::cEIT(cSectionSyncerHash &SectionSyncerHash, int Source, u_char Tid, const
// Drop bogus events - but keep NVOD reference events, where all bits of the start time field are set to 1, resulting in a negative number.
if (StartTime == 0 || StartTime > 0 && Duration == 0)
continue;
+ // Ignore events that ended before the "EPG linger time":
+ if (StartTime + Duration < LingerLimit)
+ continue;
Empty = false;
if (!SegmentStart)
SegmentStart = StartTime;