From 88dcd68ab05a9b38e0baa9548d2bcfea344a57de Mon Sep 17 00:00:00 2001 From: Rafael Caricio Date: Fri, 14 May 2021 01:18:04 +0200 Subject: [PATCH] Fix pad release process --- src/imp.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/imp.rs b/src/imp.rs index 9937f93..249691a 100644 --- a/src/imp.rs +++ b/src/imp.rs @@ -703,15 +703,18 @@ impl ElementImpl for FlexHlsSink { return; } - settings - .splitmuxsink - .as_ref() - .unwrap() - .release_request_pad(pad); + let ghost_pad = pad.downcast_ref::().unwrap(); + if let Some(peer) = ghost_pad.target() { + settings + .splitmuxsink + .as_ref() + .unwrap() + .release_request_pad(&peer); + } + pad.set_active(false).unwrap(); element.remove_pad(pad).unwrap(); - let ghost_pad = pad.downcast_ref::().unwrap(); if "audio" == ghost_pad.name() { settings.audio_sink = false; } else {