Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/video
diff options
context:
space:
mode:
authorMathieu Duponchelle <mathieu@centricular.com>2023-03-24 19:29:04 +0300
committerSebastian Dröge <sebastian@centricular.com>2023-04-05 18:15:20 +0300
commitbd6b2e0fab19f56d4c2050f088a12bd3ebe1691d (patch)
treef9dda71a177d9934c2db798a34d9f80dbbeb4eb1 /video
parentfe15b06ab6ba74ce1b15c3ece1281fa492574617 (diff)
tttocea608: fix disappearing text after special character in non-popon
To avoid special characters getting de-duplicated by the decoder, we insert no-op control commands after those. The no-op command must be picked according to the mode we're in however, inserting "resume_caption_loading" commands in roll-up mode caused obvious issues. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1161>
Diffstat (limited to 'video')
-rw-r--r--video/closedcaption/src/tttocea608/imp.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/video/closedcaption/src/tttocea608/imp.rs b/video/closedcaption/src/tttocea608/imp.rs
index ec65be69d..52217252b 100644
--- a/video/closedcaption/src/tttocea608/imp.rs
+++ b/video/closedcaption/src/tttocea608/imp.rs
@@ -661,7 +661,16 @@ impl TtToCea608 {
}
if is_specialna(cc_data) {
- state.resume_caption_loading(self, mut_list);
+ // adapted from libcaption's generation code:
+ // specialna are treated as control charcters. Duplicated control charcters are discarded
+ // So we write a resume after a specialna as a noop control command to break repetition detection
+ match state.mode {
+ Cea608Mode::RollUp2 => state.roll_up_2(self, mut_list),
+ Cea608Mode::RollUp3 => state.roll_up_3(self, mut_list),
+ Cea608Mode::RollUp4 => state.roll_up_4(self, mut_list),
+ Cea608Mode::PopOn => state.resume_caption_loading(self, mut_list),
+ Cea608Mode::PaintOn => state.resume_direct_captioning(self, mut_list),
+ }
}
col += 1;