diff options
author | Dimitar Petrovski <dimeptr@gmail.com> | 2012-10-29 11:12:01 +0100 |
---|---|---|
committer | Dimitar Petrovski <dimeptr@gmail.com> | 2012-10-29 11:12:01 +0100 |
commit | 74f1fce1874992adb9c461997461129ec4d04559 (patch) | |
tree | 37e5cf4ec082882e7230c790676177ada018c744 | |
parent | 2897776ceea4177e110b22e7efefd5dce50304a8 (diff) | |
parent | 8362f9f9780e3804463484d67120fef296fc1dfa (diff) | |
download | vdr-plugin-eepg-74f1fce1874992adb9c461997461129ec4d04559.tar.gz vdr-plugin-eepg-74f1fce1874992adb9c461997461129ec4d04559.tar.bz2 |
Merge branch 'map-event-ceit2' into epg_short_text
Conflicts:
eepg.c
-rw-r--r-- | eepg.c | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -1901,7 +1901,7 @@ int cFilterEEPG::GetTitlesMHW1 (const u_char * Data, int Length) LogE(0, prep("Titles memory allocation error.")); return 0; } - T->Text[46] = '\0'; //end string with NULL character + //T->Text[46] = '\0'; //end string with NULL character //memcpy (T->Text, &Title->Title, 23); decodeText2((unsigned char *)&Title->Title, 23, (char*)T->Text, 47); CleanString (T->Text); @@ -1977,13 +1977,13 @@ int cFilterEEPG::GetTitlesMHW2 (const u_char * Data, int Length) T->Duration = (((Data[Pos + 5] << 8) | Data[Pos + 6]) >> 4) * 60; Len = Data[Pos + 7] & 0x3f; //isyslog ("EEPGDebug: Len:%d", Len); - T->Text = (unsigned char *) malloc (Len + 2); + T->Text = (unsigned char *) malloc (2 * Len + 1); if (T->Text == NULL) { LogE(0, prep("Titles memory allocation error.")); return 0; //fatal error } - T->Text[Len] = '\0'; //end string with NULL character - decodeText2(&Data[Pos + 8],Len,(char*)T->Text,Len+1); + decodeText2(&Data[Pos + 8],Len,(char*)T->Text,2 * Len + 1); + //T->Text[Len] = '\0'; //end string with NULL character //memcpy (T->Text, &Data[Pos + 8], Len); CleanString (T->Text); Pos += Len + 8; // Sub Theme starts here @@ -2145,7 +2145,7 @@ int cFilterEEPG::GetSummariesMHW2 (const u_char * Data, int Length) memcpy (&tmp[SummaryLength], &Data[Pos], lenText); SummaryLength += lenText; if (Loop > 1) { - tmp[SummaryLength] = '\n'; + tmp[SummaryLength] = ' ';// This is considered as an EPG bug in VDR '\n'; SummaryLength += 1; } } else @@ -2154,15 +2154,15 @@ int cFilterEEPG::GetSummariesMHW2 (const u_char * Data, int Length) Loop--; } } - S->Text = (unsigned char *) malloc (SummaryLength + 2); + S->Text = (unsigned char *) malloc (2 * SummaryLength + 1); if (S->Text == NULL) { LogE(0, prep("Summaries memory allocation error.")); return 0; //fatal error } - S->Text[SummaryLength] = '\0'; //end string with NULL character //memcpy (S->Text, tmp, SummaryLength); - decodeText2(tmp,SummaryLength,(char*)S->Text,SummaryLength + 1); + //S->Text[SummaryLength] = '\0'; //end string with NULL character + decodeText2(tmp,SummaryLength,(char*)S->Text,2 * SummaryLength + 1); CleanString (S->Text); char * delim = strchr ( (char *)S->Text, '\n' ); S->ShortTextLength = delim == NULL ? 0 : delim - (char *)S->Text; @@ -2637,7 +2637,8 @@ void cFilterEEPG::LoadIntoSchedule (void) isyslog ("EEPG: found %i themes", nThemes); isyslog ("EEPG: found %i channels", nChannels); isyslog ("EEPG: found %i titles", nTitles); - isyslog ("EEPG: of which %i reported to have no summary available; skipping these BIENTOT titles", NoSummary); + if (NoSummary != 0) + isyslog ("EEPG: of which %i reported to have no summary available; skipping these BIENTOT titles", NoSummary); isyslog ("EEPG: found %i summaries", nSummaries); if (SummariesNotFound != 0) esyslog ("EEPG: %i summaries not found", SummariesNotFound); |