mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
cea708overlay: support multiple service blocks in the same dtvcc packet
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4137>
This commit is contained in:
parent
b8730bc98e
commit
df939fe332
1 changed files with 31 additions and 27 deletions
|
@ -227,6 +227,7 @@ gst_cea708dec_process_dtvcc_packet (Cea708Dec * decoder, guint8 * dtvcc_buffer,
|
|||
|
||||
parse_index += 1;
|
||||
|
||||
while (parse_index < dtvcc_size) {
|
||||
block_size = dtvcc_buffer[parse_index] & 0x1F;
|
||||
service_number = (dtvcc_buffer[parse_index] & 0xE0) >> 5;
|
||||
parse_index += 1;
|
||||
|
@ -241,14 +242,14 @@ gst_cea708dec_process_dtvcc_packet (Cea708Dec * decoder, guint8 * dtvcc_buffer,
|
|||
" size=%d seq=%d block_size=%d service_num=%d", dtvcc_size, pkt_size,
|
||||
sequence_number, block_size, service_number);
|
||||
|
||||
|
||||
/* Process desired_service cc data */
|
||||
if (decoder->desired_service == service_number) {
|
||||
for (i = 0; i < block_size; i++) {
|
||||
/* The Dtvcc buffer contains a stream of commands, command parameters,
|
||||
* and characters which are the actual captions. Process commands and
|
||||
* store captions in simulated 708 windows: */
|
||||
gst_cea708dec_process_dtvcc_byte (decoder, dtvcc_buffer, parse_index + i);
|
||||
gst_cea708dec_process_dtvcc_byte (decoder, dtvcc_buffer,
|
||||
parse_index + i);
|
||||
}
|
||||
|
||||
for (window_id = 0; window_id < 8; window_id++) {
|
||||
|
@ -262,6 +263,9 @@ gst_cea708dec_process_dtvcc_packet (Cea708Dec * decoder, guint8 * dtvcc_buffer,
|
|||
}
|
||||
}
|
||||
|
||||
parse_index += block_size;
|
||||
}
|
||||
|
||||
return need_render;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue