From e7383edb0b991c6f3f185fbdf1b09cb485780b36 Mon Sep 17 00:00:00 2001 From: Dimitar Petrovski Date: Tue, 19 Jul 2011 21:18:11 +0200 Subject: implementded eepg-0.0.6pre-freesat_huffman_decode.diff fixed include eepg_cEIT2.diff and patch thanks to Zoolook --- eepg.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/eepg.c b/eepg.c index 2b6e7c8..883bff6 100644 --- a/eepg.c +++ b/eepg.c @@ -331,7 +331,7 @@ bool cFilterEEPG::allowedEPG (tChannelID kanalID) */ #ifndef FREEVIEW_NO_SYSLOG -#include "../tools.h" +#include /* Logging via vdr */ #ifndef isyslog #define isyslog(a...) void( (SysLogLevel > 1) ? syslog_with_tid(LOG_INFO, a) : void() ) @@ -940,6 +940,18 @@ nextloop1: void decodeText2 (const unsigned char *from, int len, char *buffer, int buffsize) { + if (from[0] == 0x1f) { + char *temp = freesat_huffman_decode (from, len); + if (temp) { + len = strlen (temp); + len = len < buffsize - 1 ? len : buffsize - 1; + strncpy (buffer, temp, len); + buffer[len] = 0; + free (temp); + return; + } + } + SI::String convStr; SI::CharArray charArray; charArray.assign(from, len); @@ -2766,7 +2778,7 @@ extern bool SystemCharacterTableIsSingleByte;*/ class cEIT2:public SI::EIT { public: - cEIT2 (cSchedules::cSchedules * Schedules, int Source, u_char Tid, const u_char * Data, + cEIT2 (cSchedules * Schedules, int Source, u_char Tid, const u_char * Data, bool OnlyRunningStatus = false); #ifdef USE_NOEPG @@ -2795,7 +2807,7 @@ extern bool SystemCharacterTableIsSingleByte;*/ } #endif /* NOEPG */ - cEIT2::cEIT2 (cSchedules::cSchedules * Schedules, int Source, u_char Tid, const u_char * Data, bool OnlyRunningStatus) + cEIT2::cEIT2 (cSchedules * Schedules, int Source, u_char Tid, const u_char * Data, bool OnlyRunningStatus) : SI::EIT (Data, false) { if (!CheckCRCAndParse ()) return; -- cgit v1.2.3