From 82ccba4267550f4b4514b21521efd5f9a9b07f2e Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Fri, 24 Mar 2023 01:34:09 +0100 Subject: [PATCH] tttocea608: fix pushing unfixed caps downstream Allowed downstream caps might hold multiple structures, simply fixating the first structure is not enough, tttocea608 must also create caps with a single structure from there (or remove the remaining structures, but new caps seems cleaner) Part-of: --- video/closedcaption/src/tttocea608/imp.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/video/closedcaption/src/tttocea608/imp.rs b/video/closedcaption/src/tttocea608/imp.rs index 3cc2a6e6..ec710d4d 100644 --- a/video/closedcaption/src/tttocea608/imp.rs +++ b/video/closedcaption/src/tttocea608/imp.rs @@ -864,6 +864,8 @@ impl TtToCea608 { ); s.fixate(); + let caps = gst::Caps::builder_full().structure(s.to_owned()).build(); + let mut state = self.state.lock().unwrap(); state.framerate = s.get::("framerate").unwrap(); @@ -873,7 +875,7 @@ impl TtToCea608 { gst::debug!(CAT, obj: pad, "Pushing caps {}", caps); - let new_event = gst::event::Caps::new(&downstream_caps); + let new_event = gst::event::Caps::new(&caps); drop(state);