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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1146>
This commit is contained in:
Mathieu Duponchelle 2023-03-24 01:34:09 +01:00
parent f18f69809a
commit 82ccba4267

View file

@ -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::<gst::Fraction>("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);