From 721a7c0117c456fe52aa62b0e75143ed0bcfa4e0 Mon Sep 17 00:00:00 2001 From: yan yan Date: Thu, 14 Dec 2017 03:58:41 +0000 Subject: ATVCC: 1. Fix tt display problem 2. text will not disappear now when restart text is received PD# NONE Change-Id: I2739a03e5fde1a9ab415e586318d4f348e34ee02 --- diff --git a/src/caption.c b/src/caption.c index d21b0c4..320457e 100644 --- a/src/caption.c +++ b/src/caption.c @@ -160,7 +160,9 @@ xds_decoder(vbi_decoder *vbi, int _class, int type, int neq, i; vbi_event e; - assert(length > 0 && length <= 32); + if ((length <= 0) || (length > 32)) + return; + //assert(length > 0 && length <= 32); // XXX we have no indication how long the program info applies. // It will be canceled on channel switch, but who knows @@ -909,12 +911,12 @@ set_cursor(cc_channel *ch, int col, int row) { if (row < ch->row1) { ch->row1 = row; - clear_roll(ch); - update_all(ch); + //clear_roll(ch); + //update_all(ch); } else if (row >= ch->row1 + ch->roll) { ch->row1 = row - ch->roll + 1; - clear_roll(ch); - update_all(ch); + //clear_roll(ch); + //update_all(ch); } ch->col = ch->col1 = col; @@ -955,7 +957,7 @@ put_char(struct caption *cc, cc_channel *ch, vbi_char c) static inline cc_channel * switch_channel(struct caption *cc, cc_channel *ch, int new_chan) { - word_break(cc, ch, 1); // we leave for a number of frames + //word_break(cc, ch, 1); // we leave for a number of frames return &cc->channel[cc->curr_chan = new_chan]; } @@ -1760,6 +1762,9 @@ vbi_caption_init(vbi_decoder *vbi) ch->pg[0].font[1] = vbi_font_descriptors; memcpy(&ch->pg[1], &ch->pg[0], sizeof(ch->pg[1])); + + if (i >= 4) + ch->pos_flag = 1; } for (i = 0; i < 2; i++) { -- cgit