summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY4
-rw-r--r--eit.c7
3 files changed, 10 insertions, 2 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 89b60fd1..a63644fa 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -2315,6 +2315,7 @@ Tobias Bratfisch <tobias@reel-multimedia.com>
for reducing the number of time(NULL) calls in vdr.c's main loop to a single call
for improving efficiency of cEIT::cEIT()
for fixing the use of time_t in cEIT::cEIT()
+ for making EIT events be processed only if a plausible system time is available
Bruno Roussel <bruno.roussel@free.fr>
for translating OSD texts to the French language
diff --git a/HISTORY b/HISTORY
index dca06569..7c1e40a2 100644
--- a/HISTORY
+++ b/HISTORY
@@ -6075,7 +6075,7 @@ Video Disk Recorder Revision History
- cFrameDetector::Analyze() now syncs on the TS packet sync bytes (thanks to
Oliver Endriss for reporting broken index generation after a buffer overflow).
-2009-05-12: Version 1.7.8
+2009-05-15: Version 1.7.8
- Fixed a typo in aspect ratio 2.21:1 (reported by Reinhard Nissl).
- The name of the function cDevice::GetVideoSize() wasn't very well chosen
@@ -6096,3 +6096,5 @@ Video Disk Recorder Revision History
- Added MPEG 1 handling to remux.c (thanks to Ales Jurik).
- Fixed use of time_t in cEIT::cEIT() (thanks to Tobias Bratfisch).
- Added missing update of lastOsdSizeUpdate.
+- EIT events are now only processed if a plausible system time is available, to
+ avoid wrong handling of PDC descriptors (thanks to Tobias Bratfisch).
diff --git a/eit.c b/eit.c
index 8e8dd490..1189a108 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 2.4 2009/05/10 14:47:31 kls Exp $
+ * $Id: eit.c 2.5 2009/05/15 12:34:43 kls Exp $
*/
#include "eit.h"
@@ -17,6 +17,8 @@
#include "libsi/section.h"
#include "libsi/descriptor.h"
+#define VALID_TIME (31536000 * 2) // two years
+
// --- cEIT ------------------------------------------------------------------
class cEIT : public SI::EIT {
@@ -46,6 +48,9 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data, bo
struct tm tm_r;
struct tm t = *localtime_r(&Now, &tm_r); // this initializes the time zone in 't'
+ if (Now < VALID_TIME)
+ return; // we need the current time for handling PDC descriptors
+
SI::EIT::Event SiEitEvent;
for (SI::Loop::Iterator it; eventLoop.getNext(SiEitEvent, it); ) {
bool ExternalData = false;