From 11238579a57927a65a6e10fd965eaeef37d947a2 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Mon, 8 Mar 2021 23:58:17 +0100 Subject: [PATCH] tttocea608: pad immediately for the duration of the input buffer Pushing the pending padding once we receive the following gap or buffer means we will push it too late otherwise. Part-of: --- video/closedcaption/src/tttocea608/imp.rs | 2 ++ video/closedcaption/tests/tttocea608.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/video/closedcaption/src/tttocea608/imp.rs b/video/closedcaption/src/tttocea608/imp.rs index 4daf24e8..3cb383be 100644 --- a/video/closedcaption/src/tttocea608/imp.rs +++ b/video/closedcaption/src/tttocea608/imp.rs @@ -778,6 +778,8 @@ impl TtToCea608 { ); } + state.pad(element, mut_list, state.max_frame_no); + self.srcpad.push_list(bufferlist) } diff --git a/video/closedcaption/tests/tttocea608.rs b/video/closedcaption/tests/tttocea608.rs index efcc57b7..658c77cb 100644 --- a/video/closedcaption/tests/tttocea608.rs +++ b/video/closedcaption/tests/tttocea608.rs @@ -107,7 +107,7 @@ fn test_one_timed_buffer_and_eos() { assert_eq!(e.2, &*data); } - assert_eq!(h.buffers_in_queue(), 0); + assert_eq!(h.buffers_in_queue(), 23); h.push_event(gst::event::Eos::new());