mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-23 03:50:59 +00:00
threadshare/inputselector: Prepare/unprepare any existing sinkpads together with the source pad
We need to reset the sinkpad states when going from/to NULL state.
This commit is contained in:
parent
bbf800f17f
commit
a9b43da6cd
1 changed files with 10 additions and 0 deletions
|
@ -434,6 +434,11 @@ impl InputSelector {
|
|||
|
||||
self.src_pad.prepare(&InputSelectorPadSrcHandler);
|
||||
|
||||
let pads = self.pads.lock().unwrap();
|
||||
for pad in pads.sink_pads.values() {
|
||||
pad.prepare(&InputSelectorPadSinkHandler::new());
|
||||
}
|
||||
|
||||
gst_debug!(CAT, obj: element, "Prepared");
|
||||
|
||||
Ok(())
|
||||
|
@ -445,6 +450,11 @@ impl InputSelector {
|
|||
|
||||
self.src_pad.unprepare();
|
||||
|
||||
let pads = self.pads.lock().unwrap();
|
||||
for pad in pads.sink_pads.values() {
|
||||
pad.unprepare();
|
||||
}
|
||||
|
||||
*state = State::default();
|
||||
|
||||
gst_debug!(CAT, obj: element, "Unprepared");
|
||||
|
|
Loading…
Reference in a new issue