tttocea708: Fix off-by-one issue

last_frame_no is used to eventually calculate the outgoing pts. We want to
increment it *after* having created the content

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1947>
This commit is contained in:
Edward Hervey 2024-11-28 16:52:07 +01:00 committed by GStreamer Marge Bot
parent f4d2bd1a5d
commit 8bb0a7eecc

View file

@ -260,8 +260,6 @@ impl TextToCea708 {
fn cc_data(&mut self) {
self.check_erase_display();
self.last_frame_no += 1;
let seq_no = self.sequence_no;
self.sequence_no = (self.sequence_no + 1) & 0x3;
@ -300,6 +298,8 @@ impl TextToCea708 {
packet: cc_data[2..].to_vec(),
frame_no: self.last_frame_no,
});
self.last_frame_no += 1;
}
fn pad(&mut self, frame_no: u64) {