summaryrefslogtreecommitdiff
path: root/eit.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-05-28 13:17:20 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-05-28 13:17:20 +0200
commit7701acd968c91de94c1d0ae184a0f746c4ae5844 (patch)
treec66f7457c6dfd66eca823855a2f560d053d6d827 /eit.c
parentb4cbb84489020d0fa3e45fbff60cf1ce43ea6a1b (diff)
downloadvdr-7701acd968c91de94c1d0ae184a0f746c4ae5844.tar.gz
vdr-7701acd968c91de94c1d0ae184a0f746c4ae5844.tar.bz2
Now using hash tables to speed up cSchedule::GetEvent()
Diffstat (limited to 'eit.c')
-rw-r--r--eit.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/eit.c b/eit.c
index d43a2013..a8ac9df2 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 1.106 2005/05/28 10:07:12 kls Exp $
+ * $Id: eit.c 1.107 2005/05/28 11:35:55 kls Exp $
*/
#include "eit.h"
@@ -52,11 +52,12 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data)
if (SiEitEvent.getStartTime() == 0 || SiEitEvent.getDuration() == 0)
continue;
Empty = false;
+ cEvent *newEvent = NULL;
cEvent *pEvent = (cEvent *)pSchedule->GetEvent(SiEitEvent.getEventId(), SiEitEvent.getStartTime());
if (!pEvent) {
// If we don't have that event yet, we create a new one.
// Otherwise we copy the information into the existing event anyway, because the data might have changed.
- pEvent = pSchedule->AddEvent(new cEvent(pSchedule, SiEitEvent.getEventId()));
+ pEvent = newEvent = new cEvent(SiEitEvent.getEventId());
if (!pEvent)
continue;
}
@@ -221,6 +222,9 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data)
delete ExtendedEventDescriptors;
delete ShortEventDescriptor;
+ if (newEvent)
+ pSchedule->AddEvent(newEvent);
+
pEvent->SetComponents(Components);
pEvent->FixEpgBugs();