]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Freesat_huffman: Suppress characters < 0x20 except \n.
authordave-p <gh@pickles.me.uk>
Fri, 15 Mar 2019 09:33:19 +0000 (09:33 +0000)
committerJaroslav Kysela <perex@perex.cz>
Fri, 15 Mar 2019 12:24:46 +0000 (13:24 +0100)
Bug #5366 reported control codes appearing in EPG data on UK Freeview; this was fixed in commit 3ae6d947a4d074b3498e59f82d5a860273b0ae7f. However the same issue affects DVB-T2 channels where the EPG is Huffman coded.
freesat_huffman.c already has code to suppress these control codes, however the decoding is stopped when one is encountered and so the text is truncated. This patch drops the control codes but continues to decode the remaining text.

src/epggrab/support/freesat_huffman.c

index f6cb0924510c51821ca7dccb01b728280448d4a1..dd0e5c3a37552ae2d0b793ad81b3ab13d870616b 100644 (file)
@@ -5808,9 +5808,9 @@ size_t freesat_huffman_decode
                                nextCh = (value >> 24) & 0xff;
                                bitShift = 8;
                                if ((nextCh & 0x80) == 0) {
-                                       if (nextCh < ' ')
-                                               nextCh = STOP;
                                        lastch = nextCh;
+                                       if ((nextCh < 0x20) && (nextCh != '\n'))
+                                               nextCh = ESCAPE;
                                }
                        } else {
                                indx = (unsigned int) lastch;