diff options
author | Mathieu Duponchelle <mathieu@centricular.com> | 2020-11-20 23:32:30 +0300 |
---|---|---|
committer | Mathieu Duponchelle <mathieu@centricular.com> | 2021-01-19 18:40:00 +0300 |
commit | a3dafea688201cc03efad5a5f5cef0915d9c011a (patch) | |
tree | 88730639107da5ec889d2a6da0691d74cd6c1bfe | |
parent | 084c9d1447614fe5352c0106e9a1a9e1bb6af6e7 (diff) |
libcaption: fix parity code calculation
A misplaced parenthesis was causing the odd parity bit to
be set based on an incomplete version of the preamble
-rw-r--r-- | video/closedcaption/src/c/eia608.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/video/closedcaption/src/c/eia608.c b/video/closedcaption/src/c/eia608.c index cb51ad3e7..a3782df5c 100644 --- a/video/closedcaption/src/c/eia608.c +++ b/video/closedcaption/src/c/eia608.c @@ -46,8 +46,8 @@ eia608_row_pramble (int row, int chan, int x, int underline) { row = eia608_reverse_row_map[row & 0x0F]; return eia608_parity (0x1040 | (chan ? 0x0800 : 0x0000) | ((row << 7) & - 0x0700) | ((row << 5) & 0x0020)) | ((x << 1) & 0x001E) | (underline ? - 0x0001 : 0x0000); + 0x0700) | ((row << 5) & 0x0020) | ((x << 1) & 0x001E) | (underline ? + 0x0001 : 0x0000)); } uint16_t |