summaryrefslogtreecommitdiff
path: root/eit.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-05-16 14:45:11 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-05-16 14:45:11 +0200
commitb0583e5373e10119fd88d935cdded1e153101e22 (patch)
tree2281fe1f09492c8a528e48356571776ec7401324 /eit.c
parent6e274dfeef1987bebfa2d662fc40e03bbad4951f (diff)
downloadvdr-b0583e5373e10119fd88d935cdded1e153101e22.tar.gz
vdr-b0583e5373e10119fd88d935cdded1e153101e22.tar.bz2
Switched from 'summary.vdr' to 'info.vdr'
Diffstat (limited to 'eit.c')
-rw-r--r--eit.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/eit.c b/eit.c
index 6c6381b1..9875f99b 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.103 2005/03/20 12:33:51 kls Exp $
+ * $Id: eit.c 1.104 2005/05/15 10:36:04 kls Exp $
*/
#include "eit.h"
@@ -91,8 +91,7 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data)
SI::ExtendedEventDescriptors *ExtendedEventDescriptors = NULL;
SI::ShortEventDescriptor *ShortEventDescriptor = NULL;
cLinkChannels *LinkChannels = NULL;
- int NumComponents = 0;
- SI::ComponentDescriptor *ComponentDescriptors[MAXCOMPONENTS];
+ cComponents *Components = NULL;
for (SI::Loop::Iterator it2; (d = SiEitEvent.eventDescriptors.getNext(it2)); ) {
switch (d->getDescriptorTag()) {
case SI::ExtendedEventDescriptorTag: {
@@ -193,12 +192,10 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data)
uchar Stream = cd->getStreamContent();
uchar Type = cd->getComponentType();
if (1 <= Stream && Stream <= 2 && Type != 0) {
- if (NumComponents < MAXCOMPONENTS) {
- ComponentDescriptors[NumComponents++] = cd;
- d = NULL; // so that it is not deleted
- }
- else
- dsyslog("more than %d component descriptors!", MAXCOMPONENTS);
+ if (!Components)
+ Components = new cComponents;
+ char buffer[256];
+ Components->SetComponent(Components->NumComponents(), cd->getStreamContent(), cd->getComponentType(), I18nNormalizeLanguageCode(cd->languageCode), cd->description.getText(buffer, sizeof(buffer)));
}
}
break;
@@ -221,18 +218,7 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data)
delete ExtendedEventDescriptors;
delete ShortEventDescriptor;
- if (NumComponents > 0) {
- cComponents *Components = new cComponents(NumComponents);
- for (int i = 0; i < NumComponents; i++) {
- char buffer[256];
- SI::ComponentDescriptor *cd = ComponentDescriptors[i];
- Components->SetComponent(i, cd->getStreamContent(), cd->getComponentType(), I18nNormalizeLanguageCode(cd->languageCode), cd->description.getText(buffer, sizeof(buffer)));
- delete cd;
- }
- pEvent->SetComponents(Components);
- }
- else
- pEvent->SetComponents(NULL);
+ pEvent->SetComponents(Components);
pEvent->FixEpgBugs();
if (LinkChannels)