From 0c4ea45548ae8fcdf95a3408cf851f5d4aa8c6cc Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Tue, 3 Jun 2025 00:03:56 +1000 Subject: [PATCH] cea708overlay: also reset the output size on flush stop Otherwise, a flushing seek may cause no captions to be displayed. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/695 Part-of: --- video/closedcaption/src/cea708overlay/imp.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/video/closedcaption/src/cea708overlay/imp.rs b/video/closedcaption/src/cea708overlay/imp.rs index c8380d3f7..dda394454 100644 --- a/video/closedcaption/src/cea708overlay/imp.rs +++ b/video/closedcaption/src/cea708overlay/imp.rs @@ -452,6 +452,13 @@ impl Cea708Overlay { state .cea708_renderer .set_safe_title_area(settings.safe_width, settings.safe_height); + if let Some((width, height)) = state + .video_info + .as_ref() + .map(|vinfo| (vinfo.width(), vinfo.height())) + { + state.cea708_renderer.set_video_size(width, height); + } drop(state); gst::Pad::event_default(pad, Some(&*self.obj()), event)