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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1946>
This commit is contained in:
Edward Hervey 2024-11-28 16:51:15 +01:00 committed by GStreamer Marge Bot
parent 80b9d7081a
commit 4d31001c4b

View file

@ -418,6 +418,8 @@ impl AggregatorImpl for Cea708Mux {
let format = state.out_format; let format = state.out_format;
let fps = state.fps; let fps = state.fps;
*state = State::default(); *state = State::default();
state.writer.set_output_padding(true);
state.writer.set_output_cea608_padding(true);
state.out_format = format; state.out_format = format;
state.fps = fps; state.fps = fps;
state.n_frames = 0; state.n_frames = 0;
@ -578,6 +580,8 @@ impl ElementImpl for Cea708Mux {
gst::StateChange::ReadyToPaused => { gst::StateChange::ReadyToPaused => {
let mut state = self.state.lock().unwrap(); let mut state = self.state.lock().unwrap();
*state = State::default(); *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 => { gst::StateChange::PausedToReady => {
let mut state = self.state.lock().unwrap(); let mut state = self.state.lock().unwrap();
*state = State::default(); *state = State::default();
state.writer.set_output_padding(true);
state.writer.set_output_cea608_padding(true);
} }
_ => (), _ => (),
} }