aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@kernellabs.com>2010-06-07 00:10:27 (GMT)
committerDevin Heitmueller <dheitmueller@kernellabs.com>2010-06-07 00:10:27 (GMT)
commitd9e45838a70bfd324ca1bd37eb734e0ee8d8a5b4 (patch)
tree4c049d47a0581d08cb459f15f9708206004bee3e /src
parentf3a6758a82ef4ff921bb668a8e7779e2fa4d52d1 (diff)
Import patch from Sourceforge tvtime tracker related to CC double-byte chars
This patch adds an additional check to prevent double-byte characters, such as 0x11 0x39 (non-breaking space), from being misinterpreted as control sequences. Without the patch, 0x11 0x39 incorrectly causes a switch to paint-on mode. Original patch by: Nick Duffek ( nickaerva ) - 2006-09-24 18:23:44 UTC
Diffstat (limited to 'src')
-rw-r--r--src/vbidata.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vbidata.c b/src/vbidata.c
index 6b55fce..69e198f 100644
--- a/src/vbidata.c
+++ b/src/vbidata.c
@@ -600,7 +600,10 @@ int ProcessLine( vbidata_t *vbi, uint8_t *s, int bottom )
return 0;
}
- if( vbi->vs && vbi->enabled && b1 >= 0x10 && b1 <= 0x1F && b2 >= 0x20 && b2 <= 0x7F ) {
+ if( vbi->vs && vbi->enabled && b1 >= 0x10 && b1 <= 0x1F && b2 >= 0x20 && b2 <= 0x7F
+ /* Double-byte characters are distinguishable from control codes by
+ having bit 6 clear and bit 4 set. */
+ && (b2 & 0x50) != 0x10 ) {
int code;
if( (b2 & 64) ) {
/* Preamble Code */

Privacy Policy