mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-15 23:01:02 +00:00
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>
This commit is contained in:
parent
fe15b06ab6
commit
bd6b2e0fab
1 changed files with 10 additions and 1 deletions
|
@ -661,7 +661,16 @@ impl TtToCea608 {
|
||||||
}
|
}
|
||||||
|
|
||||||
if is_specialna(cc_data) {
|
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;
|
col += 1;
|
||||||
|
|
Loading…
Reference in a new issue