So this huffman issue only happens when a user zapperdy zap zap zaps on multi-tuner box... eg. zapping tuner 1 while opentv zapper has also initiated an epg download on tuner 2?
Many..
< 438.7103> 17:45:54.2754 [huffman] Error. Cannot decode Huffman data
huffman_root is being reset to NULL each zap prior to the check for valid epg transpoder in the call to the huffman_read_dictionary() function.
I think moving the code in huffman.cpp for the epg transponder validation check so that it is above the huffman_root NULL should stop those huffman decode errors.
Code:
diff --git a/lib/base/huffman.cpp b/lib/base/huffman.cpp
index 70ef87c8a8..a8e6be661c 100644
--- a/lib/base/huffman.cpp
+++ b/lib/base/huffman.cpp
@@ -12,6 +12,13 @@ type_huffman_node huffman_root;
bool huffman_read_dictionary (char *file)
{
FILE *fd;
+ fd = fopen (file, "r");
+
+ if (!fd)
+ return false;
+ else
+ eDebug("[huffman] read.. '%s'", file);
+
char line[512];
char value[256];
char code[256];
@@ -24,15 +31,6 @@ bool huffman_read_dictionary (char *file)
huffman_root.p0 = NULL;
huffman_root.p1 = NULL;
- eDebug("[huffman] read.. '%s'", file);
-
- fd = fopen (file, "r");
- if (!fd)
- {
- //eDebug("[huffman] Cannot open dictionary file");
- return false;
- }
-
while (fgets (line, sizeof(line), fd))
{
memset (value, 0, sizeof (value));