mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-24 11:00:29 +00:00
fallbackswitch: Flush and deactivate pads before releasing them
This commit is contained in:
parent
b6ebad2761
commit
1f7126a8a1
1 changed files with 6 additions and 0 deletions
|
@ -1418,6 +1418,12 @@ impl ElementImpl for FallbackSwitch {
|
|||
}
|
||||
|
||||
fn release_pad(&self, element: &Self::Type, pad: &gst::Pad) {
|
||||
let pad = pad.downcast_ref::<super::FallbackSwitchSinkPad>().unwrap();
|
||||
let mut pad_state = pad.imp().state.lock();
|
||||
pad_state.flush_start();
|
||||
drop(pad_state);
|
||||
|
||||
let _ = pad.set_active(false);
|
||||
element.remove_pad(pad).unwrap();
|
||||
|
||||
element.child_removed(pad, &pad.name());
|
||||
|
|
Loading…
Reference in a new issue