From ddce5829d5068e8cf6aaae5fc6bb7f42107a18d6 Mon Sep 17 00:00:00 2001 From: Evgeny Date: Wed, 11 Jan 2017 19:18:32 +0300 Subject: [PATCH] Musical note should replace 'Delete' in G0 Table --- src/lib_ccx/ccx_decoders_708.c | 8 ++++++-- src/lib_ccx/ccx_decoders_708_encoding.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lib_ccx/ccx_decoders_708.c b/src/lib_ccx/ccx_decoders_708.c index 7f0916f4..4fef3114 100644 --- a/src/lib_ccx/ccx_decoders_708.c +++ b/src/lib_ccx/ccx_decoders_708.c @@ -1224,9 +1224,13 @@ int _dtvcc_handle_G0(ccx_dtvcc_service_decoder *decoder, unsigned char *data, in unsigned char c = data[0]; ccx_common_logging.debug_ftn(CCX_DMT_708, "[CEA-708] G0: [%02X] (%c)\n", c, c); - unsigned char uc = dtvcc_get_internal_from_G0(c); ccx_dtvcc_symbol sym; - CCX_DTVCC_SYM_SET(sym, uc); + if (c == 0x7F) { // musical note replaces the Delete command code in ASCII + sym.sym = CCX_DTVCC_MUSICAL_NOTE_CHAR; + } else { + unsigned char uc = dtvcc_get_internal_from_G0(c); + CCX_DTVCC_SYM_SET(sym, uc); + } _dtvcc_process_character(decoder, sym); return 1; } diff --git a/src/lib_ccx/ccx_decoders_708_encoding.h b/src/lib_ccx/ccx_decoders_708_encoding.h index 3fcbb880..0318a0f1 100644 --- a/src/lib_ccx/ccx_decoders_708_encoding.h +++ b/src/lib_ccx/ccx_decoders_708_encoding.h @@ -1,6 +1,8 @@ #ifndef _CCX_DECODERS_708_ENCODING_H_ #define _CCX_DECODERS_708_ENCODING_H_ +#define CCX_DTVCC_MUSICAL_NOTE_CHAR 9836 // Unicode Character 'BEAMED SIXTEENTH NOTES' + unsigned char dtvcc_get_internal_from_G0(unsigned char g0_char); unsigned char dtvcc_get_internal_from_G1(unsigned char g1_char); unsigned char dtvcc_get_internal_from_G2(unsigned char g2_char);