summaryrefslogtreecommitdiff
path: root/eepg.c
diff options
context:
space:
mode:
authorDimitar Petrovski <dimeptr@gmail.com>2011-09-04 21:15:06 +0200
committerDimitar Petrovski <dimeptr@gmail.com>2011-09-04 21:15:06 +0200
commitd50399f90ce029e449f1a2627e5b12cb6a52f620 (patch)
tree521ca3904963f6a3b764b43f8fd24567e471d229 /eepg.c
parent584131eff2c25df6fd7c321253bf133d9a6e780c (diff)
downloadvdr-plugin-eepg-d50399f90ce029e449f1a2627e5b12cb6a52f620.tar.gz
vdr-plugin-eepg-d50399f90ce029e449f1a2627e5b12cb6a52f620.tar.bz2
implemented dish title/description
changed malloc to new
Diffstat (limited to 'eepg.c')
-rw-r--r--eepg.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/eepg.c b/eepg.c
index 9dea796..597b2e1 100644
--- a/eepg.c
+++ b/eepg.c
@@ -2869,7 +2869,7 @@ cEIT2::cEIT2 (cSchedules * Schedules, int Source, u_char Tid, const u_char * Dat
}
tChannelID channelID (Source, getOriginalNetworkId (), getTransportStreamId (), getServiceId ());
- LogD(2, prep("channelID: %s"), channelID.ToString());
+ LogD(2, prep("channelID: %s"), *channelID.ToString());
cChannel *channel = Channels.GetByChannelID (channelID, true);
if (!channel) {
LogD(2, prep("!channel"));
@@ -3246,6 +3246,17 @@ cEIT2::cEIT2 (cSchedules * Schedules, int Source, u_char Tid, const u_char * Dat
}
if (!rEvent) {
+ if (DishShortEventDescriptor) {
+ pEvent->SetTitle(DishShortEventDescriptor->getText());
+ LogD(2, prep("DishTitle: %s"), DishShortEventDescriptor->getText());
+
+ }
+ if (DishExtendedEventDescriptor) {
+ pEvent->SetDescription(DishExtendedEventDescriptor->getText());
+ pEvent->SetShortText(DishExtendedEventDescriptor->getShortText());
+ LogD(2, prep("DishDescription: %s"), DishExtendedEventDescriptor->getText());
+ LogD(2, prep("DishShortText: %s"), DishExtendedEventDescriptor->getShortText());
+ }
if (ShortEventDescriptor) {
char buffer[Utf8BufSize (256)];
unsigned char *f;
@@ -3271,6 +3282,8 @@ cEIT2::cEIT2 (cSchedules * Schedules, int Source, u_char Tid, const u_char * Dat
}
delete ExtendedEventDescriptors;
delete ShortEventDescriptor;
+ delete DishExtendedEventDescriptor;
+ delete DishShortEventDescriptor;
pEvent->SetComponents (Components);
@@ -3401,7 +3414,8 @@ DishDescriptor::DishDescriptor(void)
DishDescriptor::~DishDescriptor()
{
- free(decompressed);
+ delete[] decompressed;
+ decompressed = NULL;
}
void DishDescriptor::Decompress(unsigned char Tid)
@@ -3425,7 +3439,7 @@ void DishDescriptor::Decompress(unsigned char Tid)
if (length <= 0 || !dLength)
return;
- decompressed = (unsigned char*)malloc(dLength+1);
+ decompressed = new unsigned char[2*dLength+1];
HuffmanTable *table;
unsigned int tableSize, numBits;