Fix pad release process

This commit is contained in:
Rafael Caricio 2021-05-14 01:18:04 +02:00
parent b160278c6b
commit 88dcd68ab0
Signed by: rafaelcaricio
GPG key ID: 3C86DBCE8E93C947

View file

@ -703,15 +703,18 @@ impl ElementImpl for FlexHlsSink {
return;
}
let ghost_pad = pad.downcast_ref::<gst::GhostPad>().unwrap();
if let Some(peer) = ghost_pad.target() {
settings
.splitmuxsink
.as_ref()
.unwrap()
.release_request_pad(pad);
.release_request_pad(&peer);
}
pad.set_active(false).unwrap();
element.remove_pad(pad).unwrap();
let ghost_pad = pad.downcast_ref::<gst::GhostPad>().unwrap();
if "audio" == ghost_pad.name() {
settings.audio_sink = false;
} else {