From 517cd69d54b05d5382940f38cb284c301fc89603 Mon Sep 17 00:00:00 2001 From: yan yan Date: Tue, 12 Dec 2017 03:56:10 +0000 Subject: PD#NONE: zvbi: decode XDS without XDS end command 1. decode XDS without XDS end command Change-Id: Icd4b0777c58a3a8aa3ca4befa3e32ad5df8c0cc9 --- diff --git a/src/caption.c b/src/caption.c index 6320e9a..27de703 100644 --- a/src/caption.c +++ b/src/caption.c @@ -1442,6 +1442,13 @@ vbi_decode_caption(vbi_decoder *vbi, int line, uint8_t *buf) cc->xds = (c1 != XDS_END); goto finish; } else if (c1 <= 0x1F) { + xds_sub_packet *sp = cc->curr_sp; + unsigned int class, type; + if (sp) { + class = (sp - cc->sub_packet[0]) / elements(cc->sub_packet[0]); + type = (sp - cc->sub_packet[0]) % elements(cc->sub_packet[0]); + xds_decoder(vbi, class, type, sp->buffer, sp->count - 2); + } cc->xds = FALSE; } else if (cc->xds) { xds_separator(vbi, buf); -- cgit