summaryrefslogtreecommitdiff
authoryan yan <yan.yan@amlogic.com>2017-12-15 06:07:27 (GMT)
committer yan yan <yan.yan@amlogic.com>2017-12-15 06:07:27 (GMT)
commitec8488499943085490b280b7065e20e8a14c4319 (patch)
tree58e4ea17b172949a9410dd328ee14e6b4d701862
parentfd2827167cbe0268a42e29e56bc585a1eeba38fe (diff)
downloadlibzvbi-ec8488499943085490b280b7065e20e8a14c4319.zip
libzvbi-ec8488499943085490b280b7065e20e8a14c4319.tar.gz
libzvbi-ec8488499943085490b280b7065e20e8a14c4319.tar.bz2
ATVCC: fix pop-on issue
PD# NONE Change-Id: Iad614d109f68fc1d1baa06d93edd9a331176c364
Diffstat
-rw-r--r--src/caption.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/caption.c b/src/caption.c
index b96a8d6..d7aca7b 100644
--- a/src/caption.c
+++ b/src/caption.c
@@ -912,16 +912,12 @@ set_cursor(cc_channel *ch, int col, int row)
{
if (row < ch->row1) {
ch->row1 = row;
- //clear_roll(ch);
- //update_all(ch);
if (ch->mode == MODE_ROLL_UP) {
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);
if (ch->mode == MODE_ROLL_UP) {
clear_roll(ch);
update_all(ch);
@@ -1158,9 +1154,12 @@ caption_command(vbi_decoder *vbi, struct caption *cc,
case 0: /* Resume Caption Loading 001 c10f 010 0000 */
ch = switch_channel(cc, ch, chan & 3);
- ch->mode = MODE_POP_ON;
+ if (ch->mode != MODE_POP_ON) {
+ erase_memory(cc, ch, ch->hidden);
+ erase_memory(cc, ch, ch->hidden ^ 1);
+ }
-// no? erase_memory(cc, ch);
+ ch->mode = MODE_POP_ON;
return;
@@ -1192,6 +1191,9 @@ caption_command(vbi_decoder *vbi, struct caption *cc,
case 9: /* Resume Direct Captioning 001 c10f 010 1001 */
// not verified
ch = switch_channel(cc, ch, chan & 3);
+ if (ch->edm_flag) {
+ erase_memory(cc, ch, ch->hidden);
+ }
ch->mode = MODE_PAINT_ON;
return;