From 4d31001c4bd0f555bd0533d932856ac0dbc6848d Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Thu, 28 Nov 2024 16:51:15 +0100 Subject: [PATCH] cea708mux: Always pad cea708 Instead of pushing gaps, we should send out valid (empty) cea708 buffers downstream, like we do in most other caption element Part-of: --- video/closedcaption/src/cea708mux/imp.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/video/closedcaption/src/cea708mux/imp.rs b/video/closedcaption/src/cea708mux/imp.rs index 1312ce4b..b07617d4 100644 --- a/video/closedcaption/src/cea708mux/imp.rs +++ b/video/closedcaption/src/cea708mux/imp.rs @@ -418,6 +418,8 @@ impl AggregatorImpl for Cea708Mux { let format = state.out_format; let fps = state.fps; *state = State::default(); + state.writer.set_output_padding(true); + state.writer.set_output_cea608_padding(true); state.out_format = format; state.fps = fps; state.n_frames = 0; @@ -578,6 +580,8 @@ impl ElementImpl for Cea708Mux { gst::StateChange::ReadyToPaused => { let mut state = self.state.lock().unwrap(); *state = State::default(); + state.writer.set_output_padding(true); + state.writer.set_output_cea608_padding(true); } _ => (), } @@ -588,6 +592,8 @@ impl ElementImpl for Cea708Mux { gst::StateChange::PausedToReady => { let mut state = self.state.lock().unwrap(); *state = State::default(); + state.writer.set_output_padding(true); + state.writer.set_output_cea608_padding(true); } _ => (), }